Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075919 Posts in 44152 Topics- by 36120 Members - Latest Member: Royalhandstudios

December 29, 2014, 03:30:52 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)My Own Variables...
Pages: [1]
Print
Author Topic: My Own Variables...  (Read 715 times)
stolide
Level 0
**


Quaff, oh quaff this kind nepenthe!

longwoodmagic@hotmail.com
View Profile Email
« on: December 24, 2009, 08:18:43 PM »

Sorry if I am asking too many questions with too much rapidity, but I am actually trying to figure these things out on my own first. I merely happen to be failing miserably. Tongue

I'm trying to set up a global variable to determine whether or not the player selected to use a specific ritual (the LBRP in this case, you play as an occultist) by assigning it a 1 or 0. The help in game maker says "You create new variables by assigning a value to them (no need to declare them first)."

Quote
FATAL ERROR in
action number 1
of Create Event
for object lbrp:

COMPILATION ERROR in code action
Error in code at line 1:
   global.lbrp=0

at position 8: Variable name expected.

I'm pretty sure I just told it to assign a 0 to global.lbrp without declaring it first, but it obviously is not working. Would someone be so kind as to elucidate my problem? I have the feeling that it is just some simple noobish thing that I am doing incorrectly, but oh well.

Thanks in advance.
Logged

Sites of mine,

(On energetic dualism) http://teneonon.weebly.com/

(Homebrew tabletop rpgs) http://quomodo.weebly.com/
roboprez
Level 1
*


Got to love them pixels


View Profile WWW Email
« Reply #1 on: December 25, 2009, 12:06:21 AM »

K from the infomation you've given I think your Doing everything right. Either I'm just another n00b but it may be to do with something else in your code, check for any other varible that shares the same name. What I always do in these situations is make a blank project with only the code I need to test, that way there is no interferance from any other code
Logged

stolide
Level 0
**


Quaff, oh quaff this kind nepenthe!

longwoodmagic@hotmail.com
View Profile Email
« Reply #2 on: December 25, 2009, 09:54:24 AM »

Thanks, that helped me figure it out. I was using variables that already exist in game maker, unintentionally. If the text lights up purple, it isn't something unique.

Considering I'm a pseudo-science major (might as well say I'm getting a degree in biology as well as philosophy) I should have thought to limit all potential sources of error when testing for something...  Facepalm
Logged

Sites of mine,

(On energetic dualism) http://teneonon.weebly.com/

(Homebrew tabletop rpgs) http://quomodo.weebly.com/
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic