Quantcast WoWInterface - View Single Post - Dividing hundreds and thousands by a comma
View Single Post
Unread 12-18-12, 05:12 PM   #5
A Flamescale Wyrmkin
Join Date: Aug 2009
Posts: 124
Originally Posted by Seerah View Post
If you take away the "local", then yes - it will be a global. Unless you declare that variable as local in your upvalues (outside of the function, therefore local to your whole Lua file.)
Thanks all.

So with this example, just so I've got it straight in my head:

Lua Code:
  1. M.GetData_CalculateListingValue = function(announce)
  2.     announce = (announce or false);
  3.     -- doing stuff with announce
  4. end

The function argument 'announce' will now be a global because it wasn't declared local within the function?
Aanson is offline   Reply With Quote