Need help with SetGlobalInt/GetGlobalInt

Well I’m trying to use them but they’re not working for me, isn’t this supposed to work?



lua_run SetGlobalInt([[global_test]], 10)
> SetGlobalInt([[global_test]], 10)...
]  lua_run print(GetGlobalInt([[global_test]]))
> print(GetGlobalInt([[global_test]]))...
10
] lua_run_cl print(GetGlobalInt([[global_test]]))
0

Its SetGlobalInt(“Name”, <number>)

Example:

SetGlobalInt(“PabloIsWin”, 23)

and then

GetGlobalInt(“PabloIsWin”) would return 23.

Not sure where you got the idea of [] from.

Edit:

If you are doing it in console, replace " " with ’ '.

that’s exactly what he did

[] can be used for multi line strings

The data just sets the values in _G, not shared(server/client) data. Use NWVars or usermessages/net library to send data cross state.

SetGlobal* is networked

I use [] for console. And yeah I could use ’ ’

Anyway, I get it now, all networked stuff is broke clientside : http://www.facepunch.com/showthread.php?t=1204547

I think I found this bug, looking into it now