attempt to call field '_onRelease'

im developing a tourism mobile app for android. but im having this error. anyone pliz help me

local composer = require( "composer" ) local scene = composer.newScene() local widget = require("widget") local myApp = require("myapp") widget.setTheme(myApp.theme) local views = {} -- Require the widget library local widget = require( "widget" ) local background = display.newImageRect("background.jpg",480, 800) background.x = display.contentCenterX background.y = display.contentCenterY local button1 = widget.newButton { width = 160, height = 230, defaultFile = "button\_maps.png", onRelease ="mapscene" } button1.x, button1.y = 200, 190 Text = display.newText( "View Location", 0,0, "Masque") Text:setFillColor( 0, 0, 0) Text.x = 200 Text.y = 240 button1:addEventListener( "touch", buttonPress ) local button2 = widget.newButton { width = 160, height = 230, defaultFile = "locate.png", onRelease ="locate" } button2.x, button2.y = 200, 300 Text = display.newText( "Locate Location", 0,0, "Masque") Text:setFillColor( 0, 0, 0 ) Text.x = 200 Text.y = 350 button2:addEventListener( "touch", buttonPress ) -- body function scene:destroy( event ) local sceneGroup = self.view end scene:addEventListener( "create", scene ) scene:addEventListener( "show", scene ) scene:addEventListener( "hide", scene ) scene:addEventListener( "destroy", scene ) return scene

You need to pass a callback function to onRelease, not a string value.   Also, where is your “buttonPress” function?

You need to pass a callback function to onRelease, not a string value.   Also, where is your “buttonPress” function?