Ramirow
Veteran OT User
- Joined
- Aug 22, 2009
- Messages
- 584
- Solutions
- 15
- Reaction score
- 301
- Location
- Argentina
- YouTube
- ramirogrant
Hello guys, I have a doubt, as the title says, how does really Return in LUA works?
For instance, I have this script.
After that, I have some more 'if's', returning true after that statement would stop the script execution? And if I do return false, it will carry on?
Or that's not the way it works?
Hopefully someone could clarify it. Thanks in advance!
For instance, I have this script.
Code:
for i=1,#runes,1 do
if runes[i].name == string.lower((words.." "..param)) then
local voc = player:getVocation():getId()
if isInArray({3, 7, 4, 8}, voc) then
player:sendTextMessage(MESSAGE_STATUS_SMALL, "Your vocation cannot use this spell.")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
return true
end
After that, I have some more 'if's', returning true after that statement would stop the script execution? And if I do return false, it will carry on?
Or that's not the way it works?
Hopefully someone could clarify it. Thanks in advance!