• RunString vs CompileString
    2 replies, posted
What's the difference between [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Global/RunString]RunString[/url] and [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Global/CompileString]CompileString[/url], apart from the function returned?
[QUOTE=rtm516;50454391]What's the difference between [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Global/RunString]RunString[/url] and [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Global/CompileString]CompileString[/url], apart from the function returned?[/QUOTE] The first one doesnt return nothing if you execute it. The second one can return a value if you put it in the string as lua, so you can get one variable to the file you execute it from the string.
The first will return the error message if any, only if the third argument is false. The second one will return a function that can call the compiled string at will, I believe it also allows returning of values from the compiled string.
Sorry, you need to Log In to post a reply to this thread.