View Single Post
01-23-14, 05:05 PM   #1
Aanson
A Flamescale Wyrmkin
Join Date: Aug 2009
Posts: 124
Getting the number of indexes in an array.

Has anyone else noticed that since the most recent update, using the select function with the first arg "#" always results in a return value of 1?

Lua Code:
  1. self.Events = {"PLAYER_ENTERING_WORLD", "PLAYER_REGEN_DISABLED", "PLAYER_REGEN_ENABLED"};
  2.  
  3. for i = 1, select("#", self.Events) do
  4.   self:RegisterEvent(self.Events[i]);
  5. end

I've had to change to this instead.

Lua Code:
  1. #self.Events
__________________
__________________
  Reply With Quote