Luis Carrasco a écrit :
Hi I am coding directly in Neko for scripting embedding it into a C DLL and loading the DLL into C#. I want to have a global variable in my neko script and be able to retrieve the value from any function i call. Aparently every time i call it from another function the previous modification is lost.

Remove the "var" in front of the first line to use a real global.

You're here declaring a local, which is copied in the context of each of the two functions, so they will both manipulate a distinct "x" value, as it should specified in the Neko specs.

Best,
Nicolas

--
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to