ID:145143
 
After 3 days (and a few long nights) of doing the tutorials and reading the guides and references, Ive completely started again from scratch here is my eternal problem

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
Doing this
mob/proc/Gold_drop(mob/M)
var/amount = rand(10,M.gold)
M.gold -= amount
src.gold += amount
world << "[src] plays to [M] , receiving [amount] Euros!"


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="",
MobCallArg="Gold_drop", //what goes here!!!!
Source=src) // This will make sure that 'usr' will the the one who started the
// shockwave, for the called procedures.


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 ?
It would help if your programming was actually started from scratch. I've seen that demo or library or whatever it is before. It's by Yota. It'd be nice if you actually did program it from scratch so you understood everything. I suggest you reprogram it and then see if it works instead of taking someone's work and calling it your own.
In response to Exophus
with respect young fella.
The original code was a load of old nonsense of ripped bits stuck together to make somethings happen, it is now just 19k of basics so I can understand whats happening no shop, no fighting, no interactions just the shockwave which works, but doesnt do anything.
This code has indeniably yota's 'superb' shockwave included.
I am new to dm, less than 2 weeks. I know where the problem is but I cannot solve it, and the reason I put the code on the forum is so that someone can maybe help me and NOT discourage me with certain remarks.
Yota would not have released his shockwave if it was never to be used or even looked at.
If you look a little more carefully, you will notice there is a lot missing as I dont need it to interact with the objects or the turfs. the problem is, I think, in my Gold_drop proc as it does not give the player any gold.
I didn't really take a look at the library but you need to make the mob being hit the arguement.
In response to Justin B
Thanks Justin,
How is that done?
is it not here in these bits?
mob/proc/Gold_drop(mob/M)

and
MobCall="",
MobCallArg="Gold_drop",
In response to Eurobusker
No problem.

I don't really see how you are going to do it. You have to somehow check to see what the thing being hit and set MobCallArg to be it. Most likely you will need to use bumped() (that is a undefined proc that you need to search on the forums to define) and check mob/Bumped() to see if the shock wave bumps it, if it does then call that verb.

I might be missing something though.
In response to Eurobusker
I am not trying to flame you or discourage you. If anything I am encouraging you to create your own code, instead of passing off somebody else's as your own. Even though you admit it now, you said it was done from scratch before, which was not true.
In response to Exophus
SOLVED !!!!!
After 5 days I discovered that I
needed this:
var mob/npc/lady1/Gold_drop()
var mob/npc/man1/Gold_drop()


or just as good
var mob/npc/Gold_drop()

Thanks to all those who helped me.

In response to Eurobusker
Uh... are you sure you're writing DM? That snippet shouldn't even compile.
In response to Jp
Jp wrote:
Uh... are you sure you're writing DM? That snippet shouldn't even compile.

BUZZZZZ Wrong

var hi


Compiles just fine
In response to A.T.H.K
What do you need () for? o.o