ID:145205
 
Code: Simple proc call for a mob.
mob
proc
Dcheck(mob/M)
//The middle is useless for this problem.. SRC would be the mob doing the killing
if(M.client)
M.loc = locate(2,2,10)
LocationSelector(M)

proc
LocationSelector()


Problem description: Even though the client check stops NPCs from going through that part of the code, when a actual player goes through, its a Bad Client error. Actual proc itself is fine, but not during THIS call.

M = Player



Also tried giving the proc a Mob path (aka. mob/proc/Blah) to same effect.
You pass M as an argument, but your LocationSelector() is blank on arguments.
In response to Mysame
Before it wasn't, and to the same results too.
Just a suggestion first. In a deathcheck, src should usually be the thing that is dying. You can run into very annoying and confusing bugs if you try to do things wierd like that.

Which line exactly is the bad client error for? I'm assuming it's not the if(M.client), because a simple check to see if mob has a client shouldn't produce that error.

Do you have any input or alert calls in there? Those are what usually produce a bad client error.
In response to Loduwijk
Yeah, the actual proc (LocationSelector) is made of Input boxes.


I'll go see what I can do to the Deathcheck.


EDIT: I changed everything around so SRC was now the thing being killed, to the same result again.

The actual point of error is the first Input.
In response to RedlineM203
Make the input target the player you want. The first parameter to input (also for alert) is an optional one that is a reference to the client you want it to target or to its mob.
mob/verb/get_input(mob/M)
var/input = input(M, "[name] wants some input from you. So what'll it be?")
src << "[M.name]'s input: [input]"

That would make the targetted mob give the input. However, if M does not have a client then you will get a bad client error.

That first optional parameter defaults to usr. Therefor, this just means that usr is not the one you want to give the input prompt to and that you must specifically target the client that you are after.