Hello Guest it is May 10, 2021, 09:46:35 PM

Author Topic: Lua Signal Table  (Read 5561 times)

0 Members and 1 Guest are viewing this topic.

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Lua Signal Table
« Reply #10 on: January 02, 2016, 07:16:49 PM »
your second end
Re: Lua Signal Table
« Reply #11 on: January 02, 2016, 07:28:45 PM »
your second end

No doubt I've been looking at it too long, but I'm not seeing the problem with any of the end's.

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Lua Signal Table
« Reply #12 on: January 02, 2016, 09:53:05 PM »
end, should be end
Re: Lua Signal Table
« Reply #13 on: January 02, 2016, 11:28:28 PM »
According to http://www.lua.org/pil/3.6.html, trailing commas are valid in Lua.  I tried deleting it anyway, but it didn't make a difference.

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Lua Signal Table
« Reply #14 on: January 03, 2016, 12:39:57 AM »
go back to how daz says to do it that example I posted was working when I tried it, they may have done some changes I can't get it to work properly.

Offline DazTheGas

*
  •  753 753
  • DazTheGas
    • View Profile
Re: Lua Signal Table
« Reply #15 on: January 03, 2016, 05:30:14 AM »
You are trying to do it the old way, in your table your using the on_off but in your signal script your using state ,

Put your signal script back to how it was and use the already created table in the startup script and a signal like this

Code: [Select]
[mc.ISIG_INPUT63] = function (state)
   if (state == 1) then   
       mc.mcCntlFeedHold(inst)
    else
    --    do something else or not
    end
end,

DazTheGas
Theres always time for a choccy biccy
Re: Lua Signal Table
« Reply #16 on: January 03, 2016, 10:52:18 AM »
The name of the variable doesn't matter.  It's a function parameter and can be called anything.  But I tried changing it to "state" anyway.  No difference.