Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-05-2008, 03:50 AM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
2-dimensional arrays? do they exist?

Because I'm trying to make a Guild system, and it supports up to 100 guilds.
I'm using the array for the list of guilds:

serverr.guild_list

But how would I store the information of the guilds in serverr.guild_list?
If there were 2-D arrays, it would work as simple as this:

serverr.guild_list[5,1] = "Bob";

The 2nd index is 1, which represents the leader of the guild.
The guild with the index of 5, will have the leader set to the player "Bob".
The second index would be used to store all the information about the guilds.

But then again, this would work too, wouldn't it?

server.guild_list[5] = "Champions|Bob"

for(i=0;i<100;i++) {
temp.guild_list = serverr.guild_list[i].tokenize(|);
if(#t(0) == "Champions") {
for(i=0;i<10;i++)
{
this.view_guild_list[i] = #t(i)
}
}
}
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 01:59 PM.


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