What's the difference between GVAR and NEWGVAR

  • Hi, what's the difference between GVAR and NEWGVAR ? I've read in the documentation that Newgvar initialize the variable instead of set it, but what does that means concretely ? Also for exemple with this one :

    IF "<variable>" DoesNotExist
    SET GVAR "variable" "that's a test boy"
    ##some stuff 

    Bots still continue to go into the if function but not with a newgvar .
    Thanks !

  • Admin

    NEWGVAR will create the variable, GVAR will just set its value but it must already be created. So at the start of your script put the initialization, while below you can change its value since you know it's initialized.

  • @Ruri OK, thanks a lot !

Log in to reply