(11-24-2011, 01:51 AM)Your Computer Wrote: First i have to go through what causes the body of an if statement to be executed. An if statement's purpose is to allow for conditions based on an expression. An if statement triggers when the expression (i.e. what is in the parentheses) evaluates to true. Since AngelScript tends to be picky with variables in the if expression, we have to rely on boolean operators. Boolean operators allow for the expression to return either true or false. However, variables that are already of type bool don't require these operators.
I have no idea what you're trying to do in your script, but it also seems like you don't fully understand how to set and get map variables. By now i would have expected you to understand at least script variables, but it doesn't look like your script illustrates competence in that area either. I think it would be easier if i just refer to you to one of my videos: Script basics. As for map variables, you should only consider setting them when you want them to be saved with the player's progress. Otherwise just stick to script variables.
To get the current value for a map variable you'd use the get functions, like GetLocalVarString, etc. Functions are capable of returning values. You're probably used to void, but the get functions for map variables return a value of the type included in the function name. Therefore when you call that function, you're supposed to store that value in a script variable. For example,
string value = GetLocalVarString("map_var_name");
As i said before, "&in" is not for if statements; though i should also add they're not for variable declarations either. When a variable does not exist, then you have to declare the variable before you can reference it any where else. The example i gave above is itself a declaration.
I'm not the BEST, but I understand about half of the scripting process... "if" and "break" functions, I have yet to understand. (never had to use them until now) But I think I'm getting what you're saying. I'll experiment and see what I can come up with. Thanks a ton.
And I KNEW the variables I set were wrong, I was just putting in crap to see when something would come up, but I've been doing it wrong, so I've been at an impass. Again, this was my first time trying it and doing by way of "guess-and-check".
I don't know what to do... =\ It's too big of a jump for me right now. I'll just have the map run in another fashion. Thanks for the help though. I appreciate the time you took.