View Full Version : Changing / Setting Girder Variable from NR! How!
danward79
May 16th, 2005, 12:31 PM
Hi All,
I am having a stupid moment.
I know it is possible but how do you set a girder variable to a value from NR?
Mastiff
May 16th, 2005, 01:31 PM
I think you mean this:
NetRemote.SendLabel("NetRemoteVariableYouWant",GirderVariableYouSend)
Or am I wrong?
Rob H
May 16th, 2005, 01:36 PM
Yep, you're wrong. That's the wrong way round ;)
As I told Dan in chat earlier, you need to get NR to execute a girder action that passes the value in a function.
If it's a global variable then you can pass the variable name too and store the value using
_G[varname] = value
in a suitable function.
danward79
May 16th, 2005, 09:02 PM
thanks guy's,
I looked thru some of my old code, and as Rob says I need to use a function. Been so long since I did anything I can't remember how to do anything!!!!!!!!!!!!! :oops: :cry: :evil: :x
When I looked, I remembered how I did it before, like this....
NetRemote.ExecuteAction(-1,0,1,"Timer.SendDetails("..string.sub(NetRemote.GetVariable('TimerList'), 7, 7)..")");
I then seperated it out in girder as I needed.
Is that right Rob!?
Man, Babies have stopped my brain working!
Rob H
May 17th, 2005, 12:14 AM
Yep, that's the sort of thing
Matt Webster
May 18th, 2005, 03:49 PM
This looks like what I'm trying to do, but I don't follow. Is the command you reference implemented in a lua script?
I want to send the current JRMC zone from NR to girder. For example, when I click on my next zone button, I'd like to send the JRMC zone status to girder.
Matt
danward79
May 18th, 2005, 09:17 PM
Hi Matt,
Yeah you need your button to run the lua code in NR, to send an event to Girder, which then needs to be used in a girder lua script.
If you need to send a payload it needs to "de-coded" in girder to be of any use, as you can only send one payload.
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.