View Single Post
  #5  
Old 12-13-2009, 07:02 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Well it looks like you're trying to destroy the GUI and re-create it in the same function, which can cause Exception errors. To get around that I do:

PHP Code:
//#CLIENTSIDE
// Assumed Code Above
public function OpenWindowdata ){ 
  if (
isObject("Npc_Chat_Window1")) {
    
Npc_Chat_Window1.destroy();
  }
  
this.mynpcid temp.data
  
this.textarray false
  
triggerServer("weapon"this.name"getText"this.mynpcidthis.textarray);
  
// Have the GUI re-created a frame later.
  
this.scheduleevent(0.05"CreateGUI""");
}

function 
onCreateGUI() {
  new 
GuiWindowCtrl("Npc_Chat_Window1") { 
    
profile GuiBlueWindowProfile
    
clientrelative true
    
clientextent "211,231"
    
useOwnProfile true
    
profile.bitmap "guiarm_window.png"
    
canmove true
    
canresize true
    
closequery false
    
destroyonhide true// Will destroy the window when it's closed.
    
visible true// Will make sure the window is visible. 
    
text "Loading..."
    
309
    
88
     
    new 
GuiScrollCtrl("Npc_Chat_MultiLine1_Scroll") { 
       
profile GuiBlueScrollProfile
       
useOwnProfile true;  
       
profile.bitmap "guiarm_scroll.png";  
       
height 130
       
hscrollbar "dynamic"
       
vscrollbar "dynamic"
       
width 150
       
46
       
//y = 143; 

       
new GuiMLTextCtrl("Npc_Chat_MultiLine1") { 
         
profile GuiBlueMLTextProfile
         
height 130
         
//horizsizing = "width"; 
         
text "Loading..."
         
width 150
       } 
    } 
    new 
GuiScrollCtrl"Npc_Chat_Scroll" ) { 
      
this.width 176
      
this.height 75
      
profile.bitmap "guiarm_scroll.png"
      
this.19
      
this.143

      
this.hScrollBar "alwaysOff"
      
this.vScrollBar "dynamic"

      new 
GuiTextListCtrl"Npc_Chat_ItemList" ) { 
        
profile.bitmap "guiarm_window.png"
        
this.width 25
        
this.height 33
      } 
    } 
    new 
GuiShowImgCtrl("Npc_Chat_Image1") { 
      
9
      
partx 0
      
party 60
      
partw 50
      
parth 36
      
width 150
      
height 150
      
image "block.png"
    } 
  } 

I also set the booleans in destroyonhide to true and visible to true, as it may be related to your problem, but we'll see.
__________________
Quote:
Reply With Quote