Hi Lukas,
Took me a bit to understand, but George doesn't have software-global variables.
Variables in George are "restricted" to their own script and can't interact with instructions from another script.
However, I found a workaround for this, as I needed it years ago :p
You can use the command
tv_WriteUserString to save a variable to your User Config, then use the command
tv_ReadUserString to retrieve it.
In your case, the script could be written like this:
Action 1:
Code: Select all
section = "globalGeorge"
name = "globalVariable"
tv_WriteUserString section name 4
Action 2:
Code: Select all
name[1] = "HELLO"
name[2] = "EVERYONE"
name[3] = "AU"
name[4] = "REVOIR"
section = "globalGeorge"
name = "globalVariable"
default = "not found"
tv_ReadUserString section name
val = result
PRINT(name[val])
And
in theory it should work.
Also, is there a cleaner way to create arrays/tables or even structs in George?
Unfortunately, not possible.