Code:
mob/proc/Gold_drop(mob/M)
var/amount = rand(1,M.gold)
M.gold -= amount
src.gold += amount
world << "[src] hits [M] with a shockwave, receiving [amount] gold!"
mob/verb/Busk()
new/shockwave(
loc, // The shockwave shall appear where you are.
icon('Demosw.dmi',"red"), // This is the icon for each projectile.
-1, // distance, -1 is an unlimited distance.
20, // Speed.
40, // 40 projectiles in the shockwave.
StopAtDenseTurf=1,
MobCall="Gold_drop",
MobCallArg=null, //what goes here!!!!
Source=src) // This will make sure that 'usr' will the the one who started the
// shockwave, for the called procedures.
Problem description:
I get the following errors:
runtime error: undefined proc or verb /mob/npc/lady1/Gold_drop().
proc name: New (/obj/shockwave/New)
source file: Shockwave.dm,145
usr: Eurobusker (/mob/pc/musician)
src: the shockwave (/obj/shockwave)
call stack:
the shockwave (/obj/shockwave): New(the tile floor (2,2,1) (/turf/floor/tile_floor), /icon (/icon), 72, -1, 20, 0, "Gold_drop", /list (/list), 1, null, /list (/list), 1, null, /list (/list), Eurobusker (/mob/pc/musician))
does anyone know what goes here in MobCallArg???
the complete source is here for those who can check out what I did.
http://eurobuskers.free.fr/busking_source.zip
I get NO errors, the mob call is null the argument is
Gold_drop.
However... Nothing happens
what the hell is happening? have I understood? M.gold is the gold from the npc? src.gold is my gold ?