RevealedSoulEven Posted August 4, 2019 Share Posted August 4, 2019 Why is this happening? Link to comment Share on other sites More sharing options...
Administrators Enyby Posted August 4, 2019 Administrators Share Posted August 4, 2019 You try call function before declare it. So at call place this function does not exists yet. Link to comment Share on other sites More sharing options...
RevealedSoulEven Posted August 4, 2019 Author Share Posted August 4, 2019 Not understood sorry Link to comment Share on other sites More sharing options...
CmP Posted August 4, 2019 Share Posted August 4, 2019 A function has to be defined before it is called. Consider the following examples. Example 1. Incorrect order of function definition and the call to it. f() -- won't work because the function is not defined here function f() print('f') end Example 2. Correct order of function definition and the call to it. function f() print('f') end f() -- will work properly Link to comment Share on other sites More sharing options...
Question
RevealedSoulEven
Why is this happening?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.