View Single Post
  #4  
Old 08-26-2011, 03:34 AM
iBeatz iBeatz is offline
Kavan
iBeatz's Avatar
Join Date: Dec 2010
Location: Northern Ireland, UK
Posts: 154
iBeatz will become famous soon enough
Send a message via Yahoo to iBeatz
Quote:
Originally Posted by cbk1994 View Post
Post your code (at least relevant sections, i.e. the triggers).

Also, check that the triggerClient isn't actually being called twice (add an echo near it—if you see it twice, it's something else).
I've checked the trigger on the serverside with an echo, it's being called once.

PHP Code:
if(params[0] == "LoadPlayers"){
  for(
temp.pl allplayers){
    if(
temp.pl.level != NULL){
      
temp.plyrs.add(temp.pl);
    }
    else {
      
temp.rcs.add(temp.pl);
    }
  }
  
triggerClient("gui",name,"GotPlayers",temp.plyrs,temp.rcs);

And then when this info is sent to the client, which I've checked with an echo and it executes twice:

PHP Code:
function onActionClientSide(){
  
showInterface(Category_Tabs.getSelectedText());
}

function 
showInterface(opt){
  
  
with("Operations_List"){
    switch(
opt){
    case 
"Players":
      
addRow(0,"Warpto");
      
addRow(1,"Profile");
      
addRow(2,"Summon");
      
addRow(3,"Warp Player");
      
addRow(4,"Client flags");
      for(
temp.0temp.<= 4temp.++){
        
rows[temp.r].active false;
      }
   }

This is the only way the showInterface function could be called, which is what is causing the problem.
__________________

Intelligence without ambition is like a bird without wings.

Reply With Quote