ID:179538
 
I know what the runtim error is from but i cant seem to fix it
it is becuase i am a mob/master Gm and not just mob
but i cant fix this
and here is the runtime error
runtime error: type mismatch
proc name: npcdeathcheck (/mob/proc/npcdeathcheck)
source file: Combat.dm,299
usr: [Master GM] Richter (/mob)
src: the slime (/mob/slime)
call stack:
the slime (/mob/slime): npcdeathcheck([Master GM] Richter (/mob), the slime (/mob/slime))
the slime (/mob/slime): normaldamage([Master GM] Richter (/mob), the slime (/mob/slime))
the slime (/mob/slime): attack([Master GM] Richter (/mob), the slime (/mob/slime))
the slime (/mob/slime): maincombat([Master GM] Richter (/mob), the slime (/mob/slime))
the slime (/mob/slime): Click(the grass (17,8,0) (/turf/grass))
You have killed the the slime!
runtime error: type mismatch
proc name: npcdeathcheck (/mob/proc/npcdeathcheck)
source file: Combat.dm,299
usr: [Master GM] Richter (/mob)
src: the slime (/mob/slime)
call stack:
the slime (/mob/slime): npcdeathcheck([Master GM] Richter (/mob), the slime (/mob/slime))
the slime (/mob/slime): normaldamage([Master GM] Richter (/mob), the slime (/mob/slime))
the slime (/mob/slime): attack([Master GM] Richter (/mob), the slime (/mob/slime))
the slime (/mob/slime): maincombat([Master GM] Richter (/mob), the slime (/mob/slime))
the slime (/mob/slime): npcattack1([Master GM] Richter (/mob), the slime (/mob/slime))
the slime (/mob/slime): attack([Master GM] Richter (/mob), the slime (/mob/slime))
the slime (/mob/slime): maincombat([Master GM] Richter (/mob), the slime (/mob/slime))
the slime (/mob/slime): Click(the grass (17,8,0) (/turf/grass))
Richter wrote:
I know what the runtim error is from but i cant seem to fix it
it is becuase i am a mob/master Gm and not just mob
but i cant fix this
and here is the runtime error
runtime error: type mismatch
proc name: npcdeathcheck (/mob/proc/npcdeathcheck)
source file: Combat.dm,299

Since runtime errors are caused by code, it's kinda important to include the relevant code. Please post the proc, or at least about 10 lines' worth around line 299, so we can get an idea what's there.

Lummox JR
In response to Lummox JR
Here is the deathcheck proc
mob/proc
npcdeathcheck(mob/P as mob, mob/M as mob)
if (M.HP <= 0)
P << "You have killed the [M]!"
P.exp += M.expreward
alert(P, "You gain [M.expreward] exp and [M.wealthreward] money,", "Victory!")
P.gold += M.wealthreward
endbattle(P)
del (M)
else
npcattack1(P, M)
In response to Richter
Um... so which line is the one with the error?

I'm guessing your error is on one of the lines where there's a += something, in which case whatever you're adding is the wrong type. Aside from that, you might also want to consider replacing the alert() box with a simple << since you're using << for the "you have killed..." message anyway.

Lummox JR
In response to Richter
It may be having 2 mob definitions.
In response to Lummox JR
Also Lummox switching operators isn't going to help.
In response to Darke Rage
Darke Rage wrote:
Also Lummox switching operators isn't going to help.

I was just referring to the stylistic side of this; using the text box for output and then using alert() seems inconsistent. That won't solve your bug, but it'd be nice to do.

Lummox JR