runtime error: type mismatch
proc name: chekc (/mob/proc/chekc)
source file: War.dm,428
usr: Tro (/mob/pc/Diablo)
src: Tro (/mob/pc/Diablo)
call stack:
Tro (/mob/pc/Diablo): chekc("Fire Salamander Archers", 0)
the attack (/obj/hud/screens/attack): Click(the ash (6,13,1) (/turf/ash))
attack is a screen obj, and I have...
Click()
var/p=blah
var/b=blah
usr.chekc(p,b)
which outputs
chekc("Fire Salamander Archers", 0)
like it says above
which is correct...
so what's the prob?
ID:261539
Jun 20 2002, 7:20 am
|
|
In response to Lummox JR
|
|
mob
proc chekc(o,p) if(p>=0) if(o=="Fire Drakes") then if(o=="Fire Salamander Wizards") etc... there's about 40 of these and then it adds things based off of o and p, but if(p>=0( is where it messes up I think. sorry about that Lummox |
In response to Jon Snow
|
|
Jon Snow wrote:
mob Well, you need to give us a specific line where this is happening. Show the whole code, plus the arguments it's being called with (don't assume the arguments are correct, either). Lummox JR |
In response to Lummox JR
|
|
obj/hud/screens/attack mob IT gives me this error runtime error: type mismatch proc name: chekc (/mob/proc/chekc) source file: War.dm,428 usr: Tro (/mob/pc/Diablo) src: Tro (/mob/pc/Diablo) call stack: Tro (/mob/pc/Diablo): chekc("Fire Salamander Archers", 0) the attack (/obj/hud/screens/attack): Click(the ash (6,13,1) (/turf/ash)) there we go... also attack is a screen obj in my hud system... note that I didn't post ALL of the code because it's realllly BIG but it's all exactly the same as the above it's just like changing some of the names around that's all... also I have these different things show up in the statpanel, and usr.wave shows up but the others don't do anything... |
In response to Jon Snow
|
|
Jon Snow wrote:
source file: War.dm,428 See, the idea behind getting the line number is so you can find out which line it is, and show where that is in your code. I have no clue what line 428 is. Lummox JR |
In response to Lummox JR
|
|
this is line 428
src.selection2+=src.KKFireDrake |
In response to Jon Snow
|
|
Jon Snow wrote:
this is line 428 Okay, that gives us a starting point, then. Where are the selection2 and KKFireDrake vars defined? Are they being set or altered by any other code before this call? Since you've got a type mismatch, my guess is you're trying to add one number to another, but either selection2 or KKFireDrake probably isn't a number. Lummox JR |
In response to Lummox JR
|
|
thanks a ton!! Ya that's all I needed to know I didn't know what it ment by mismatch but now that you've explained it I know what the problem is and I'm going to go fix it!!
|
The problem is, you showed us the wrong proc. The crash is happening in chekc(), so obviously that's the proc you should have included in your post.
Lummox JR