Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   GUI Context Menu CTRL - Stack Overflow? (https://forums.graalonline.com/forums/showthread.php?t=68811)

KuJi 09-19-2006 04:04 AM

GUI Context Menu CTRL - Stack Overflow?
 
I right-click a username in a list and I get stack overflow occasionally, does anyone know what can cause this so I can attempt to fix it?

Admins 09-19-2006 04:22 AM

Thats recursive function call, probably a function calling itself

KuJi 09-19-2006 04:37 AM

This is the Chat calling. - In a timeout if that means anything -
PHP Code:

  if (clientr.icar || client.car)
  {
    if (
CarChat_Window0 == NULL)
    {
      
triggerserver("gui"name"chat""join"player.account);
      
onShowChat();
    }
  } 

Heres the function / gui controls

PHP Code:

function onShowChat()

  new 
GuiWindowCtrl(CarChat_Window0)
  {
    
canclose false;
    
canresize false;
    
canminimize false;
    
canmaximize false;
    
height 216;
    
profile "GuiBlueWindowProfile";
    
text "Car Chatroom";
    
width 342;
    
screenwidth 342;
    
screenheight 216;

    new 
GuiScrollCtrl(CarChat_Scroll0)
    {
      
height 161;
      
hscrollbar "alwaysOff";
      
profile "GuiBlueScrollProfile";
      
vscrollbar "dynamic";
      
width 227;
      
6;
      
24;
      
      new 
GuiMLTextCtrl(CarChat_MultiLine0)
      {
        
profile "GuiBlueMLTextProfile";
        
text "Welcome to the Car Chatroom!";
        
width 210;
        
wordwrap true;
        
3;
        
3;
      }
    }
    
    new 
GuiScrollCtrl(CarChat_Scroll1)
    {
      
height 161;
      
hscrollbar "dynamic";
      
profile "GuiBlueScrollProfile";
      
vscrollbar "dynamic";
      
width 103;
      
233;
      
24;
      
      new 
GuiTextListCtrl(CarChat_TextList0)
      {
        
height 32;
        
profile "GuiBlueTextListProfile";
        
width 80;
        
0;
        
0;
      }
    }
    
    new 
GuiTextEditCtrl(CarChat_TextEdit0)
    {
      
height 25;
      
historysize 255;
      
profile "GuiBlueTextEditProfile";
      
visible true;
      
width 330;
      
6;
      
185;
    }
    
    new 
GuiContextMenuCtrl(CarChat_Menu)
    {
      
profile "GuiBluePopUpMenuProfile";
      
textprofile "GuiBlueTextListProfile";
      
width 20;
    }
  }
}

function 
CarChat_TextList0.onOpenMenu(nodepathnamedotname)
{
  if (
pathname != player.account && !clientr.icar)
  {
    
CarChat_Menu.clearRows();
    
CarChat_Menu.addRow(0pathname);
    
CarChat_Menu.addRow(1"Remove Player");
    
this.selectednode pathname;
    
CarChat_Menu.open(mousescreenxmousescreeny);
  }
}

function 
CarChat_Menu.onSelect(entryidtext)
{
  switch (
entryid)
  {
    case 
"1":
    {
      
triggerserver("gui"name"kickout"this.selectednode);
      break;
    }
  }




All times are GMT +2. The time now is 09:19 AM.

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