Thread: obj.remove()
View Single Post
  #2  
Old 12-23-2006, 10:25 PM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally Posted by Chompy View Post
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 = { 123123};
  
temp.arr.remove1);
  
  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.
Reply With Quote