> #macro randsign()
> #if (rand(HPlanet_Seed_Value) > 0.5)
> 1
> #else
> -1
> #end
> #end
It seems you can't do that (IDK why - maybe a bug, or more likely a
"feature" of the parser). In fact you can't even do this:
#macro A()
#if(true)
1
#end
#end
It doesn't like having anything to return inside a #if within a #macro
A solution is to just use a temporary variable:
#macro randsign()
#if (rand(HPlanet_Seed_Value) > 0.5)
#local temp = 1;
#else
#local temp = -1;
#end
temp
#end
Post a reply to this message
|