View Single Post
Old 05-05-2003, 12:06 AM   #9
clu
 
clu's Avatar
 
Join Date: Oct 2002
Posts: 279
Hey sorry to keep beating this thread to death, but I have a question related to variable persistence and what you mentioned earlier.

In my player spawnscript, I define a variable called "03gamestate" to a value of "0"
-------------------------------------------------
declare ( FLOAT, "03gamestate" );
set ( "03gamestate", "0" );
-------------------------------------------------

Then, in a later script, I have an "if" statement that runs different scripts depending on the value of "03gamestate"
-------------------------------------------------
if ( get( FLOAT, "03gamestate") = "0" )
{
run ( "colo/L03/fight_brothers" );
}

else ( )
{

if ( get( FLOAT, "03gamestate") = "1" )
{
run ( "colo/L03/fight_soldiers" );
}

else ( )
{
rem ( "do nothing" );
}
}
-------------------------------------------------

My problem is that it is not recognizing the value as "0" (not running the scripts). Is this a syntax issue (I notice the use of "$$" to define numbers in other scripts. Do I need those?

-clu

clu is offline   you may: quote & reply,