
05-05-2008, 03:50 AM
|
|
Scripter
|
Join Date: Apr 2008
Posts: 157
|
|
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)
}
}
} |
|
|
|