Is it possible to stabilish "global" functions that I can call in in any program?
like
function rednetSend(msg)
msg = tostring(msg)
redenet.broadcast(msg)
end
So i can call it in any program i have.
1
Functions
Started by macss_, May 18 2014 08:04 PM
5 replies to this topic
#1
Posted 18 May 2014 - 08:04 PM
#2
Posted 18 May 2014 - 08:06 PM
You just did, any non local variable is acessible from all programs after it has been defined until the computer reboots.
#4
Posted 18 May 2014 - 08:07 PM
So if I run a program called "function" then terminate it an imediatly after i execute rednetSend("Hello") the message will be sent?
#6
Posted 18 May 2014 - 08:14 PM
Well, thank you so!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users