WoW:API and scripting quirks: Difference between revisions

m
no edit summary
(More details on Variables and a link to Talk)
mNo edit summary
Line 41: Line 41:
         local someOtherVar = true; -- someOtherVar declared inside an IF block.
         local someOtherVar = true; -- someOtherVar declared inside an IF block.
     end
     end
    -- someOtherVar *is* set to true at this point, but for some reason the following IF statement ignores it.
     Print(tostring(someOtherVar));
     Print(tostring(someOtherVar)); -- "true" is printed.
     if someOtherVar then
     if someOtherVar then
         Print("Something"); -- This never gets executed.
         Print("Something"); -- This never gets executed.