The online racing simulator
[Solved]Incorrect number of parameter in command
i cannot see what is wrong here Frown there is only username,national1 now why is the number of parameters incorrect?

3/14/2017 11:07:32 PM -> Syntax error in cfg file "./race.lpr" at line #148
Command 'GetCurrentPlayerVar' incorrect number of parameter
Function 'loop2' script aborted

SetStoredValue( $Var["value"] . " National", + GetCurrentPlayerVar( $["value"],"National1" ) );

thanks if anyone could help againSmile
I'm not too hot when it comes to Set and Get vars, but I doubt lapper understands what the plus sign is for as it's not being used for an arithmatic function.

Nor do I understand
$["value"]

Maybe try;

SetStoredValue( $Var["value"] . " National ". GetCurrentPlayerVar( "National1" ) );

or

SetStoredValue( $Var["value"] . " National ",GetCurrentPlayerVar( "National1" ) );

I've seen Yisc[NL] use these Set / Get vars a lot in his code add-ons. Maybe you should have a look at some of his code to see how it's used, and the proper syntax.

Look here.
Right found it out myself, getting proud of meBig grin

SetStoredValue( $Var["value"] . " National", GetStoredValue( $Var["value"] . " National" ) + GetPlayerVar( $Var["value"] ,"National1"));

to explain, it is a points system.
it gets the Points from the StoredValue, and adds the Points you gained from the current "Race" to it when its finnished. Will be on StoredValue later tooSmile

but thanksSmile i seem to be a bit drunk yesterday lol
sinanju

$Var["value"] is the same as $userName
but the $Var["value"] only gets used at Loops.

well so i have got explained it.
This thread is closed

FGED GREDG RDFGDR GSFDG