mob/verb/Space()
set hidden=1
if(AM<=0)
if(contents.Find(/obj/ammo/))
contents-=/obj/ammo/
AM+=20
AmmoPoints(usr)
usr<<"Reloaded."
Problem description:
the if(contents.Find(/obj/ammo/)) doesnt work >_>, it always returns 0
ID:146076
Sep 24 2005, 6:28 am
|
|
Code:
mob/verb/Space() Problem description: the if(contents.Find(/obj/ammo/)) doesnt work >_>, it always returns 0 |
In response to Lotho
|
|
mob/verb/Space() Still aint workin =P |
In response to Xeronage
|
|
mob/verb/Space() O-matic |
In response to O-matic
|
|
Still Doesn't work >_> still gives 0 at the find no matter if i have it
obj/ammo |
In response to Xeronage
|
|
mob/verb/Space() That's an other way of doing it, it should work. O-matic |
mob/verb/Space() It's not required to use src in there, but I use it whenever I am allowed to. |
In response to O-matic
|
|
runtime error: cannot remove from list
proc name: Space (/mob/verb/Space) usr: SSJ4 Compufreak (/mob/player) src: SSJ4 Compufreak (/mob/player) call stack: the thing with the Find Ammo is fixed |
mob/verb/Space()
set hidden=1
var/A = /obj/ammo
if(AM<=0)
if(contents.Find(A))
contents-=A
AM+=20
AmmoPoints(usr)
usr<<"Reloaded."
I don't really know if this would help, but it is worth a try, isn't it?