PDA

View Full Version : Online guild members


Pheoni
21-06-2007, 11:15 PM
I'm having trouble with one of my mods. The code below breaks the mod. It's attached to a button press. Basically I'm just trying to get a list of the members online.


local hour,minute = GetGameTime();
GuildRoster();
SetGuildRosterShowOffline(false);
numGuildMembers = GetNumGuildMembers(false);

MY_TEXT = MY_TEXT.."\n\n\n"..hour..":"..minute
if(numGuildMembers > 0) then
for idx=1,numGuildMembers do
local name,rank,index,level,class,zone,note,officernote,online,status=GetGuildRosterInfo(idx);
if(name~=nil and online==1)
MY_TEXT = MY_TEXT.."\n"..name;
end
end
end

JaedxRapture
21-06-2007, 11:20 PM
You missed a "then" in your if-then statement, "if name ~= nil and online == 1".

Pheoni
22-06-2007, 05:39 AM
Fixed, still broke.

Duugu
22-06-2007, 07:32 AM
Could you please specify "breaks the mod"?

Pheoni
22-06-2007, 08:22 PM
I have an open button that brings up an edit box with a few buttons. I have a save button, a close button, and a get online members button that uses the code above. When the get members code is commented out, everything works. When I uncomment the code, I can't even get the edit box frame to come up. Pressing the open button does nothing.

Telic
23-06-2007, 12:24 PM
Sounds like you should be getting error messages of some description.

Do you have something like Improved Error Frames installed that is intercepting your error messages - can you check what errors are being reported ?

Maybe the error is being reported at login and not when you try to open the edit box?

Failing that, comment out the code, and uncomment one line at a time (/ one matching pair of if/end statements at a time)

Duugu
23-06-2007, 09:32 PM
Standard error messages are deactivated sincle last patch ... or not?
Did you activate them?