I noticed that compile of
select vbuttonName$
case "menu_main_button_play"
gosub menu_main_button_play
endcase
case "menu_main_button_premium"
gosub menu_main_button_premium
endcase
case "menu_main_button_setup"
gosub menu_main_button_setup
endcase
case default
DebugLog("vbuttonProcessor(): CASE-NOT-DEFINED for vbutton.id="+str(vbutton.id)+" vbutton.name="+vbuttonName$)
endcase
endselect
works fine, but
select vbuttonName$
case "menu_main_button_play"
gosub menu_main_button_play
endcase
case "menu_main_button_premium"
gosub menu_main_button_premium
endcase
case "menu_main_button_setup"
gosub menu_main_button_setup
endcase
case default
DebugLog("vbuttonProcessor(): CASE-NOT-DEFINED for vbutton.id="+str(vbutton.id)+" vbutton.name="+vbuttonName$)
endcase
endselect
results error by compile:
main.agc:3243: error: CASE expression (Integer) must be the same data type as SELECT expression (String)
difference is:
spaces betweeen "case" and "default"