이것은 내가 가지고있는 코드입니다구문 오류 " '='예상 근처 '_APPNAME는"하지 않습니다 의미
-- start the app, declare some variables, setup the player save file.
-- APP OPTIONS
_APPNAME = "The Square Cannon"
_FONT = "Tolo"
-- OTHER UPGRADES
_SHOWADS = TRUE
-- CONSTANT VALUES
_CX = display.contentWidth*0.5 --center of the screeen going horizontally
_CY = display.contentHeight*0.5 --center of the screem going vertically
_CW = display.contentWidth -- width of the screen
_CH = display.contentHeight -- height of the screen
_T = display.screenOriginY -- top of the screen
_L = display.screenOriginX -- left of the screen
_R = display.viewableContentWidth - _L -- right of the screen
_B = display.viewableContentHeight - _T -- bottom of the screen
-- hide the status bar
display.setStatusBar(display.HiddenStatusBar)
-- include composer
local composer = require "composer"
-- include load/save library from coronarob
loadsave = require("loadsave")
-- load some audio
_BACKGROUNDMUSIC = audio.loadStream("THESQUARECANNON\audio\IceFLow" , "THESQUARECANNON\audio\FreeInstrumental")
--{
--load some sound effects, when created
--}
-- set up a saved file for our user
user = loadsave.loadTable("user.json")
if (user == nil) then
user = {}
user.playsound = true
loadsave.saveTable(user, "user.json")
end
composer.gotoScene("scene_menu")
을 그리고 이것은 내가 오류입니다 점점 :
main.lua:5: '=' expected near "'_APPNAME'"
무엇이 잘못되었을 수 있습니까? 나는 콘솔에 여전히 하나가 필요하다고 말하고 있지만 정확히 어디에 있어야하는지 정확히 =
표시가 있습니다.
'config.lua','main.lua' 및'scene_menu.lua' 파일이 세 개의 개별 파일입니까? 나는 두 파일 이름을 참조하는 오류 메시지로 판단한다. 코드를 형식화 한 방식으로는 명확하지 않습니다. 나는 너를 위해 그것을 편집 할 것이다. 그것이 틀렸다면 제 편집을 되돌릴 수 있습니다. –
편집 결과 일부 줄 번호가 표시 될 수 있습니다. ''은 파일의 끝을 의미합니다. 'config.lua'에서 후행 쉼표를 삭제하면 ''근처의 예상치 못한 기호가 사라집니다. –
'config.lua' 오류의 경우 마지막 닫기'}'다음에 쉼표를 없애면 오류를 제거해야합니다. 'main.lua' 코드가 실행되는 한 확실하지 않습니다. 그것은 나에게 똑바로 보인다. 파일의 모든 내용을 게시 했습니까? – DavisDude