|
|
> When I try to compile the following code, it says there should be a )
> after X+1.
> Am I doing this right? It's supposed to return X+1 if Dir = 0 or 1, X if
> it's 2
> or 5, and X-1 if it's 3 or 4.
#macro NextX(X,Dir)
#switch(Dir)
#range(0,1)
#local result = X+1;
#break
#case(2)
#local result = X;
#break
#range(3,4)
#local result = X-1;
#break
#case(5)
#local result = X;
#break
#end
(result)
#end
Post a reply to this message
|
|