Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-02-2012, 05:38 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Problem displaying multiple arrays

the array is set up like this:
PHP Code:
client.system.messages="""[System Message]: Welcome To Armageddon."",1,1,1,pmbubble_admin.png","""[System Message]: Say /help for some commands!"",1,1,1,pmbubble_admin.png","""[System Message]: Say /news for the Main Info H 
Im trying to simply show any arrays that are already set up on onCreated and so forth, then simple add new ones in as they come. New ones do get added in, but ALL values are duplicated every time a new one is added.

PHP Code:
// set total size of all except system
  
temp.totalSize client.mass.messages.size() + client.tell.messages.size() + client.guild.messages.size() + client.system.messages.size();

  
// add new items to category all after init
  
while (this.tempChatSize temp.totalSize && this.active == "all")
  {
    if (
client.mass.messages.size() > 0)
    {
      
ChatBox_WindowText.addtext("<img src=" @client.mass.messages[this.tempChatSize][4]@ " id=sendImg" @client.mass.messages[this.tempChatSize]@ "/>" @client.mass.messages[this.tempChatSize][0] @ "<br>"false);
    }
    if (
client.tell.messages.size() > 0)
    {
      
ChatBox_WindowText.addtext("<img src=" @client.tell.messages[this.tempChatSize][4]@ " id=sendImg" @client.tell.messages[this.tempChatSize]@ "/>" @client.tell.messages[this.tempChatSize][0] @ "<br>"false);
    }
    if (
client.guild.messages.size() > 0)
    {
      
ChatBox_WindowText.addtext("<img src=" @client.guild.messages[this.tempChatSize][4]@ " id=sendImg" @client.guild.messages[this.tempChatSize]@ "/>" @client.guild.messages[this.tempChatSize][0] @ "<br>"false);
    }
    if (
client.system.messages.size() > 0)
    {
      
ChatBox_WindowText.addtext("<img src=" @client.system.messages[this.tempChatSize][4]@ " id=sendImg" @client.system.messages[this.tempChatSize]@ "/>" @client.system.messages[this.tempChatSize][0] @ "<br>"false);
    }
    
    
// add to total added
    
this.tempChatSize++;
    
    
// force scroll to bottom
    
ChatBox_WindowText.scrolltobottom();
  } 
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
 


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 06:57 PM.


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