ID:266298
 
I get a runtime "bad client" error whenever I run this. Can anyone help me fix this code?
mob
GM
verb
WatcherToPlayer()
set name = "Make a Watcher into a Player"
set category = "Player Controlls"
var/watchers = list()
for(var/mob/Watcher/M in world)
watchers[M.key] = M
var/mob/M = input() in watchers
if(istype(M,/mob/Watcher))
if(M.client)
var/nowclosed = CLOSED
CLOSED = 1
M:client:mob = new /mob/Login_Mob (null)
del(M)
CLOSED = nowclosed
else
alert(src,"You can
only perform this action on a watcher.")
Lord of Water wrote:
I get a runtime "bad client" error whenever I run this. Can anyone help me fix this code?
mob
GM
verb
WatcherToPlayer()
set name = "Make a Watcher into a Player"
set category = "Player Controlls"
var/watchers = list()
for(var/mob/Watcher/<font color=red>M</font> in world)
watchers[M.key] = M
var/mob/<font color=red>M</font> = input() in watchers
if(istype(M,/mob/Watcher))
if(M.client)
var/nowclosed = CLOSED
CLOSED = 1
<font color=red>M:client:mob</font> = new /mob/Login_Mob (null)
del(M)
CLOSED = nowclosed
else
alert(src,"You can
only perform this action on a watcher.")

the things i made red seem to be iffy to me.

especially the colon's. If you cant use periods, figure out how to code it differently so you can, and you probably wont have any problems. Also, try another variable name for the second "M", that may be confusing it or something.

FIREking