hi guys
yep im back for help
for WOS 2.0 i need functions but cant figure out how to use them
the link for this is http://pastebin.com/7ZDgrfvy
thanks
-JoshGreatUK
0
help please (functions and stuff)
Started by joshgreat, Oct 19 2016 05:28 PM
computer lua help computer lua help
2 replies to this topic
#1
Posted 19 October 2016 - 05:28 PM
#2
Posted 19 October 2016 - 06:03 PM
you need to define functions before you use them:
local function foo() --# define the function --# code here will execute when function is called --# multiple lines are accepted end local bar = function() --# alternative way of defining functions --# content as above end foo() --# call the function bar() --# calling is the same nomater how it was defined
Edited by Lupus590, 19 October 2016 - 06:05 PM.
#3
Posted 19 October 2016 - 06:39 PM
It looks like you have function calls to non-existent functions. Define those functions at the top of your script.
Ex:
Ex:
local function helloWorld() print( "Hello, World!" ) end --#later on in the program, calling it helloWorld()
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users