I Wanna Community

Fangames => Game Design => Programming Questions => Topic started by: Taprus on May 11, 2015, 02:11:23 PM

Title: Issue with some menuSelect2 code I didnt change (yuutuu engine)
Post by: Taprus on May 11, 2015, 02:11:23 PM
___________________________________________
FATAL ERROR in
action number 1
of  Step Event
for object menuSelect2:

COMPILATION ERROR in code action
Error in code at line 2:
   if(global.difselect=0){
             ^
at position 12: Variable name expected.

(That is the error that appears)
I only changed the difficulty select screen that comes with the engine, I didnt touch any of the code yet this shows up!
I have no idea what the isue is and I dont know how to fix
plz halp

Nevermind I fixed it, it was just that I named a sound file difselect without knowing that it was already something
Title: Re: Issue with some menuSelect2 code I didnt change (yuutuu engine)
Post by: lawatson on May 11, 2015, 02:46:36 PM
Not sure what could have gone wrong, but I'm pretty sure it's saying that because it's thinking that "global.difselect" is a thing in itself and not actually just a global variable "difselect".
Title: Re: Issue with some menuSelect2 code I didnt change (yuutuu engine)
Post by: Taprus on May 11, 2015, 10:27:04 PM
Nevermind fixed it
Title: Re: Issue with some menuSelect2 code I didnt change (yuutuu engine)
Post by: YoSniper on May 12, 2015, 08:22:05 AM
That's why you should make a habit of naming every sprite strting with "spr" and every sound starting with "snd" (or similar). That inherently avoids naming errors like this.
Title: Re: Issue with some menuSelect2 code I didnt change (yuutuu engine)
Post by: Sudnep on May 12, 2015, 08:34:18 AM
That's why you should make a habit of naming every sprite strting with "spr" and every sound starting with "snd" (or similar). That inherently avoids naming errors like this.
Basically this solves 50% of the problems posted here.