ID:143582
 
Code:
            Throw_Into_Room(mob/M in world, room/R in rooms)
set category = "Admin"
set desc = "Throw a player into a room of your choice."
world << "<b>[usr] picks up [M] and throws them into [R]!!"
usr.CRoom = usr.CRoom
M.CRoom.Leave(M)
R.Join(M)


Problem description: The code is supposed to move somebody from one room to another, which it does that fine; but for some reason it makes the admin who most the person leave the room they are in. It doesn't move them to the room they moved the person into, it just makes them leave the one their in.

Please post the information in the leave proc :)
In response to Tails5 (#1)
<dm>
room/proc
Join(mob/M)
m.CRoom = src
who += M //New way of putting people in the Who cache.
who << "[m] has joined [name]!"
if(src.name == DEFAULT_TRAP_ROOM)
M << "You cannot escape from this room!"
M.verbs -= /mob/verb/Join_A_Room
else
M.verbs += /mob/verb/Join_A_Room

Leave(mob/M)
who -= M
who << "[usr] has left [name]."
Okay, I dont see anything wrong with that code, but just do this to work around it:
            Throw_Into_Room(mob/M in world, room/R in rooms)
set category = "Admin"
set desc = "Throw a player into a room of your choice."
var/a=usr.CRoom
world << "<b>[usr] picks up [M] and throws them into [R]!!"
usr.CRoom = usr.CRoom
M.CRoom.Leave(M)
R.Join(M)
usr.CRoom=a