The online racing simulator
[Solved] Syntax error in OnLapperStart()
How can I fix this error?

Syntax error in cfg file: '<' needed at line #306 in funtion 'OnLapperStart' script aborted

Here is the section it's referring to:

#==================================#
#Event triggered when lapper starts#
#==================================#
Event OnLapperStart()
GlobalVar $drift_on_off;
$drift_on_off = "off";
PlayerVar $driftmaster_left = "1"; #t to move scoreboard right, then increase this number (max 160)
PlayerVar $driftmaster_down = "124"; to move scoreboard up or down, increase or decrease this number
EndEvent

Quote from TheSAgibbs :How can I fix this error?

Syntax error in cfg file: '<' needed at line #306 in funtion 'OnLapperStart' script aborted

Here is the section it's referring to:

#==================================#
#Event triggered when lapper starts#
#==================================#
Event OnLapperStart()
GlobalVar $drift_on_off;
$drift_on_off = "off";
PlayerVar $driftmaster_left = "1"; #to move scoreboard right, then increase this number (max 160)
PlayerVar $driftmaster_down = "124"; [B]#[/B]to move scoreboard up or down, increase or decrease this number
EndEvent


You forgot a # , that might fix the bug

PlayerVar $driftmaster_down = "124"; #to move scoreboard up or down,
Okay that's fine, except now I have a new error:

LFSLapper
at LFSLapper.LFSClient.Loop<Connect insimConnection> in D:\Dev\DevInsim\lapper\LFSLapper5.70\src\LFSClient\loop.cs:line 642
at LFSlapper.LFSClient..ctor<String scriptfilename, Boolean debugmode> in D:\Dev\DevInsim\laper\LFSLapper5.70\src\LFSClient\lfsclient.cs:line 527
at LFSlapper.LFSLapper.Main<String[] Args> in D:\Dev\DevInsm\lapper\LFSLapper5.70\src\Main.cs:line 149
Void Loop<InSim.Connect>
Quote from TheSAgibbs :How can I fix this error?

Syntax error in cfg file: '<' needed at line #306 in funtion 'OnLapperStart' script aborted

Here is the section it's referring to:

#==================================#
#Event triggered when lapper starts#
#==================================#
Event OnLapperStart()
GlobalVar $drift_on_off;
GlobalVar $driftmaster_left;
GlobalVar $driftmaster_down;
$drift_on_off = "off";
$driftmaster_left = "1"; #t to move scoreboard right, then increase this number (max 160)
$driftmaster_down = "124"; #to move scoreboard up or down, increase or decrease this number
EndEvent


You cant use PlayerVar in OnLapperstart() because its not a player function

GetPlayerVar($username ,"Var")
SetPlayerVar($username ,"Var", $Value)
This thread is closed

FGED GREDG RDFGDR GSFDG