Thread: removeweapon()
View Single Post
  #12  
Old 07-10-2008, 06:28 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Dan View Post
Drakilors method would work too. He's using [0], not [temp.i], so it would just delete all first weapons in the list untill nothing's left.
But like Stefan said, player.weapons is a special object in that it can give you a string list which could include weapons that don't actually exist. If you try to removeweapon() a weapon in that list that isn't an actual weapon, the weapon won't be removed from the list thus causing an infinite loop.
__________________
Do it with a DON!
Reply With Quote