ID:176999
 
Can someone help me figure out what's wrong? The screen turns blank whenever I try to "get" the bat I put on the map.
Here's the code:

obj
tool
bat
icon = 'tools.dmi'
icon_state = "bat"

mob/student
icon = 'student.dmi'
var
M
verb/chat(msg as text)
world << "[usr] says: [msg]"
verb/get(obj/tool in oview(1))
src.loc = usr.contents
var
health = 100
Stat()
stat("health",health)
statpanel("Inventory",contents)
Move the get() verb to the to the object, not the person. And take out the arguments, and put "set src in oview(1)" in the verb.
In response to Garthor
OK, but it still dosen't put the bat in my inventory. and it's still left on the map.
In response to Delita12345
Delita12345 wrote:
OK, but it still dosen't put the bat in my inventory. and it's still left on the map.

One of the other problems you have is this:
src.loc = usr.contents
contents is a list, not a location; you can't set loc to it. Setting it to usr, however, will work just fine:
src.loc = usr

My preferred method to handle gettable items is to set up a special type of obj for them, and put the verbs there; that way anything you can't pick up has no verb for it.
obj/item
verb/Get()
set src=oview(1)
loc=usr
usr << "You pick up \a [src]."
oview() << "[usr] picks up \a [src]."
verb/Drop()
set src=usr.contents // = instead of "in" will choose automatically
loc=usr.loc
usr << "You drop [src]."
oview() << "[usr] drops \a [src]."

Lummox JR