Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / [Unity] Another unity question.

Author
Message
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 14th May 2009 16:59 Edited at: 14th May 2009 17:00
Hello, i'm trying to pass a value from DBPro into a lua function, but I cant do it.

I CAN pass a value into a function by using lua set function, but because there are no global variables in lua, I can't pass this value into an already running function. (The following was taken fromn the manual, and refers to C as the language, can this be converted to DBPro?)
Quote: "To access and change the value of global variables, you can use regular table operations over an environment table. For instance, to access the value of a global variable, do
lua_pushstring(L, varname);
lua_gettable(L, LUA_GLOBALSINDEX);"

Is there any way I can either create/access a global variable, or pass a value from one function into an already running function?

(Basically what i'm doing is calling a function, passing a value via SendMessageS() to DBPro asking for a blank object number and having that value passed into another function. I can't change the value in the original function using Lua Set Int either, i've tried!)

Your signature has been erased by a mod because it is way too awesome!

Login to post a reply

Server time is: 2024-04-16 08:13:44
Your offset time is: 2024-04-16 08:13:44