Quote:
Originally Posted by Stryke
This wont work. Anyone know a way to remove a string from a string array, then sorting them back together so they won't leave a gap from where the string that was removed was?
|
Yes, array.remove("text");
Quote:
Originally Posted by Stryke
NPC Code:
this.count = 0;
for(i=0;i<serverr.guild_total;i++ {
if(i>(params[1]+this.count)) {
serverr.guild_list[i-1] = serverr.guild_list[i];
this.count += 1;
}
}
params[1] is GA_List.getselectedrow()
|
Try something like this:
PHP Code:
for(i = 0, temp.count = -1; i < serverr.guild_total; i++, temp.count ++) {
if (i > (params[1] + count)) {
serverr.guild_list.remove(serverr.guild_list[i]);
}
}
(May be very inaccurate to what you're trying to do, but you didn't give enough details.)