Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anything wrong with this if-statement?
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#3
RE: Anything wrong with this if-statement?

Like Silent said, your if statement is syntactically correct. Shouldn't be an issue there. What statement(s) follow your if statement? Also, where is this if statement? If I recall correctly, if statements enclosed in for-loops or switch-case structures can cause issues. Maybe it's vice versa. But anyways my experience just tells me to avoid that kind of control flow, especially if your if statement is using braces to enclose more than one expression.

And do the statements enclosed following your if statement fail to execute? Also, try adding a debug message to show you the value of the local variable "gamestate". To concatenate, just use the + operator between the string and GetLocalVarInt("gamestate"). It's one of the rare few implicit conversions we are allowed to do without the compiler throwing a fit.

By the way. What does ProgLog do? I've NEVER used it and the documentation on it is skint. I usually use Print or AddDebugMessage Smile

(This post was last modified: 03-28-2012, 08:30 PM by palistov.)
03-28-2012, 08:25 PM
Find


Messages In This Thread
RE: Anything wrong with this if-statement? - by palistov - 03-28-2012, 08:25 PM



Users browsing this thread: 1 Guest(s)