#If return end and then end is the same thing
15 messages · Page 1 of 1 (latest)
local s = true
if s then return end
is this the same thing as
local s = true
if s then
end
thats stupid
it is the same thing-
why do ppl use return
return is meant to be for functions
but if they use it for scripts
unlike this ```lua
function Print()
return "Hello world"
end
and like this ```lua
return
it basically cancels the rest of script
yes, return is used for getting a function to return a value, so for example
function addNumbers(numberOne, numberTwo)
return numberOne + numberTwo
end
print(addNumbers(2,3)) --this would print 5