• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker 'Noob question' my variables are not tuning blue =(

2

2cute2die

Guest
Hi total noob so please be gentle.

I'm following a 'spelunky' style level gen tutorial and im currently making a script. my issue is when i try to set some variables in the IDE they do not turn blue, also some of the other parts of the code do not change to the colours of the tutorial.

so my question is, am i doing something wrong? can i set variables in scripts or do i need to set them elsewhere first?

the variables are 'xTiles' 'yTiles' 'inst'
also the 'levelData' isn't yellow =(

here is the tutorial im following, i have timestamped the part where you can compare ur code
 

Attachments

B

BGamers11

Guest
Did you try to wait a bit or like close and re-open the window, or click in the window? I also don't think that theres is a problem on variables not turning blue or levelData turning yellow... Pardon me if I'm being rude...
 
2

2cute2die

Guest
hi @BGamers11 , thanks for the response, no your not rude at all, yeh i waited and clicked out and even looked around as i thought maybe i had to set the variables elsewhere. buuuutttt i just closed the program and reopend when i saw your response and all the colours are correct. so i guess the classic turn it off and on again would of worked. i attached a pic but it hasnt shown as i have under 5 posts.
 
The person on your tutorial is probably using a different color-coding setting on the script editor. If you go to preferences, you can change the colors of the text in your code editor.

The color you choose to use don't mean anything. They are just for looks. But it's useful to have some sort of color scheme so you know that you are typing things correctly.

Long story short: It's nothing to worry about ;)
 

Mulakulu

Member
I am experiencing the same thing, but I have two instances open with basically the same code, where one has colors and the other one doesn't. I've tried closing and reopening, saving, I think everything that's normal to go through in a situation like this. It's really bothering me that I get gray instead of blue and yellow variables.
 
Hello Mulakulu,
Did you created those Variables in your second Instance too? Maybe you did a spelling mistake there?
 

Mulakulu

Member
I copy pasted. And the weirdest thing is happening, where if I mouse over the gray variables, it shows their "actual color"

1691497406494.png 1691497433780.png 1691497470102.png
 

Mulakulu

Member
and now in the same project that doesn't allow the blue text, I tried making another object with a simple variable, and it worked! The others are still gray, so it must be something in the object itself that's messing it up?

1691499397860.png
 

Mulakulu

Member
Yeah, I just deleted the object and copied it in again. I don't know what's different but it works now. That's annoying, but I'll just hope it doesn't happen again
 

TheouAegis

Member
Don't worry about the coloring too much. The most important errors are those little icons that show up in the gutter on the left.
 

Mulakulu

Member
Don't worry about the coloring too much. The most important errors are those little icons that show up in the gutter on the left.
I'm not really worried about it. It just annoys me that the coloring is inconsistent and doesn't make sense sometimes, and I'd like to know why
 
Top