Author Topic: Issue with some menuSelect2 code I didnt change (yuutuu engine)  (Read 2194 times)

Taprus

  • Cherry Eater
  • Posts: 58
  • idkman
  • OS:
  • Windows 8.1/Server 2013 Windows 8.1/Server 2013
  • Browser:
  • Chrome 42.0.2311.135 Chrome 42.0.2311.135
    • View Profile
  • Playstyle: Keyboard
___________________________________________
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
« Last Edit: May 11, 2015, 10:26:13 PM by Taprus »
I'm somewhat decent at video games

lawatson

  • The Kid
  • Posts: 331
  • I do things and I make things.
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 42.0.2311.135 Chrome 42.0.2311.135
    • View Profile
  • Playstyle: Keyboard
Re: Issue with some menuSelect2 code I didnt change (yuutuu engine)
« Reply #1 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".
(click to show/hide)

smoke weed everyday

Taprus

  • Cherry Eater
  • Posts: 58
  • idkman
  • OS:
  • Windows 8.1/Server 2013 Windows 8.1/Server 2013
  • Browser:
  • Chrome 42.0.2311.135 Chrome 42.0.2311.135
    • View Profile
  • Playstyle: Keyboard
Re: Issue with some menuSelect2 code I didnt change (yuutuu engine)
« Reply #2 on: May 11, 2015, 10:27:04 PM »
Nevermind fixed it
I'm somewhat decent at video games

YoSniper

  • Awexome
  • Global Moderator
  • Spike Dodger
  • Posts: 142
  • People regard me as a programming overlord.
  • OS:
  • Linux Linux
  • Browser:
  • Chrome 42.0.2311.111 Chrome 42.0.2311.111
    • View Profile
    • My YouTube
  • Playstyle: Keyboard
Re: Issue with some menuSelect2 code I didnt change (yuutuu engine)
« Reply #3 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.
I don't traverse the forums as much anymore. Follow me on Twitter if you want to keep tabs on me!

Twitter: @YoSniperGames
Twitch: yosniper

Streams happen whenever I feel like it.

Sudnep

  • Global Moderator
  • Spike Dodger
  • Posts: 124
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 42.0.2311.135 Chrome 42.0.2311.135
    • View Profile
  • Playstyle: Keyboard
Re: Issue with some menuSelect2 code I didnt change (yuutuu engine)
« Reply #4 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.