Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 

WoWInterface » Developer Discussions » General Authoring Discussion » Getting the number of indexes in an array.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off