
12-23-2006, 10:25 PM
|
|
Enigma
|
Join Date: Feb 2002
Posts: 1,072
|
|
Quote:
Originally Posted by Chompy
Well, I have one problem: I have an array storing all the ammount of each weapon a player has, but removing an ammount is weirder then I thought,
example:
PHP Code:
function onCreated()
{
temp.arr = { 1, 2, 3, 1, 2, 3};
temp.arr.remove( 1);
echo( temp.arr);
}
It removes the first 1 it finds ( 0), when I try to clear out the other 1 ( 3)
I've tried like temp.arr[ 3] = NULL; temp.arr[ 3].clear();
Anyone know the solution for this?
|
Use .delete();
temp.arr.delete(index); to remove by index instead of object. |
|
|
|