I defined a system variable in my CAPL file that I use to set up different modes in my script.
I declared it in my CAPL file and not in my CANAlyzer window in order to allow the script to work with different configs.
sysDefineNamespace("NameSpace");
sysDefineVariableInt("NameSpace","VariableName",0);
The declaration has worked because I can change the value of this system variable with on key events.
The problem is with on sysvar events, the syntax that I saw on the internet is not working. I use this one:
on sysvar NameSpace::VariableName{
sysSetVariableInt("NameSpace","VariableName",0); //init tout à off
}
I get a compilation error :
Compiling...
Options: CANalyzer, Realtime
Name (1, 11) Error 1249: Variable name 'NameSpace' not found
Compilation errors.
I'm pretty sure it is a syntax error but I didn't manage to fix it.
Thank you for your help !
I tried to change the syntax several time without success.
on sysvarcan only be used with system variables that are defined at compile-time.on sysvarevents will not be triggered.