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.

DarkBASIC Professional Discussion / LUA Unity problem - Cannot access a global variable when using "Lua Call" from DB

Author
Message
pdq
20
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 26th Aug 2010 22:43
The problem is that if I call SetA(8) from within LUA I can assign the value of B to 8 and then access and print the value of B from DBPro which of course gives back 8

However, if instead of calling SetA() from within LUA, I call it from DB pushing the value of 8, when I access and print the value of B I get 0. I am stumped

DB Code


LUA code


Thanks.
Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 26th Aug 2010 22:49
I've never used Unity, but I recommend using Barnsky's Lua plugin, I've heard it's got a lot of features that Unity doesn't have, and it's free.

"everyone forgets a semi-colon sometimes." - Phaelax
pdq
20
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 27th Aug 2010 05:41
Problem is that a number of my programs use Unity, by switching over to Barnsky's plugin I believe I have to remove Unity and redo all my code. I would like to avoid that for now.

Login to post a reply

Server time is: 2026-07-23 12:10:49
Your offset time is: 2026-07-23 12:10:49