ID:270125
 
In my game, I want the player to only be able to hold one item. I was wondering, because I have been using a single var, if I should use a list, even though it's only one item. I can't use Move() with the obj because var/obj/item/held isn't a location...
Um, please clarify some of the questions I have
-Hold one item in the inventory or hand 'hand'?
-What was the single var you have been using and what is it used for (if it isn't self-explanitory)
-Why do you say "I can't use Move() with the obj because var/obj/item/held isn't a location"? If it's an error saying that, please provide a snippet of your moving code or whereever the error orginates from

When I get some insight on those, than I probably can help :)

- GhostAnime
In response to GhostAnime
Well actually, I'm doing a list. Here's the code.
mob/player
icon='player.dmi'
var
obj/item/list/held
verb
Get()
if(held.len>=1)
src<<"<font color=#FF0000>Use or discard your current item first.</font>"
return 0
var/obj/item/list/items=new()
for(var/obj/item/I in oview(0))
items+=I
var/obj/item/O=input("Get?","Get")in items
O.Move(src.held)


I get this error at runtime:

runtime error: undefined proc or verb /list/Enter().

proc name: Get (/mob/player/verb/Get)
usr: Dark Weasel (/mob/player)
src: Dark Weasel (/mob/player)
call stack:
Dark Weasel (/mob/player): Get()

Any help would be appreciated.
In response to Dark Weasel
I didn't really look at it all to much, but you might need to initiate O. You do that by doing new O right after the input() line. Also, shouldn't Get() be in the /obj/ Verb?
In response to Kalzar
I'll eventually has it as a macro, so i want it to be there the whole time.