How would I pass arguments to a file using loadfile()? I need to pass arguments to a file somehow, while it acts as a function.
Why? I'm making an OS with utilities I have created, and since I don't want 30 lines for a function, I would like to have a file have sets of utilities for the OS, like how real operating systems do things. So how would I do this? I am creating an alert box, and I want to be able to pass text. Thanks!
Pass arguments to file
Started by Gumball, Oct 22 2015 12:03 PM
4 replies to this topic
#1
Posted 22 October 2015 - 12:03 PM
#2
Posted 22 October 2015 - 12:26 PM
local func = loadfile( "thefileyouwanttorun" ) func( arguments )
#3
Posted 22 October 2015 - 12:39 PM
KingofGamesYami, on 22 October 2015 - 12:26 PM, said:
local func = loadfile( "thefileyouwanttorun" ) func( arguments )
I need to get the arguments into the actual program. I know how to pass arguments, but I need the code to actually take account of that.
Edited by bluebird173, 22 October 2015 - 12:39 PM.
#4
Posted 22 October 2015 - 01:53 PM
local args = {...}
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











