Is there a difference between "return warn("abcd")" and "warn ("abcd") return)?

This is such a stupid post…

Title is self explanatory;

function Balls(a: boolean)
   if not a then
     warn("a is not true!!!")
     return
   end
end

function Circles(a: boolean)
   if not a then
     return warn("a is not true!!!")
   end
end

-- Is there a difference between these???

The first one (Balls) prints out the warning and then returns the function, while the other one returns the warning. (Circles)

1 Like

Functionally, there isn’t a difference between the 2.
The return in Circles returns the output of the warn, which is nil, and the return in Balls returns nothing, AKA nil.

The only difference is just how it looks in code.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.