Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
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
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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

Forum Jump


All times are GMT +2. The time now is 03:11 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.