Hello
Guest
it is
March 29, 2024, 04:35:57 AM
Guest
Login
Register
Menu
Home
Help
Search
Calendar
Members
Members
View the memberlist
Search For Members
Login
Register
YouTube
Machsupport Forum
/
Mach Discussion
/
Mach4 General Discussion
/
accessibility of lua functions?
« previous
next »
Print
Pages:
1
Go Down
Author
Topic: accessibility of lua functions? (Read 1414 times)
0 Members and 1 Guest are viewing this topic.
django013
130
accessibility of lua functions?
«
on:
April 30, 2017, 11:41:28 AM »
Hello,
I added a script to a tab-page onEnter, which contains a function and works so far.
Now I want to reuse that function from a buttons leftup script - and that fails. Where do I have to put functions right, so that both scripts can use it?
Logged
DazTheGas
778
DazTheGas
Re: accessibility of lua functions?
«
Reply #1 on:
April 30, 2017, 01:45:08 PM »
You will need to declare your functions in the Screen_Load_Script this will make it available at all objects within the Gui except the Lua Panels
DazTheGas
Logged
New For 2022 - Instagram: dazthegas
django013
130
Re: accessibility of lua functions?
«
Reply #2 on:
May 01, 2017, 03:18:59 AM »
Thanks! That was the key.
As the manual didn't mention function declarations at all, I asked Mr.Google and he gave me a helping hand
Function declaration is just asigning a value to a variable =:O
Works pretty well and it is completely awfull, how fast lua is
Logged
django013
130
Re: accessibility of lua functions?
«
Reply #3 on:
May 06, 2017, 12:04:14 AM »
Hello,
build 3384 broke this rule. Now no declarations from screenload script are recognized and I can not access functions. I added there.
What's the new way of doing it right?
Logged
Print
Pages:
1
Go Up
« previous
next »