ID:173559
 
Err me have trouble. I want to list all the items one has and then when one selects an item it drops on the floor under him, BUT i obviously under-estimated how hard this'd be and now i'm stuck.


mob/verb/Drop()
var/mob/list/T=list()
for(var/obj/O in usr)
T+=O
input("Drop what?") in T
if(!T)
return

Code.dm:98:error::invalid expression
Just give the verb to obj's.
obj
verb
Drop()
//etc.
In response to Garthor
I mostly did this so i could learn, i don't like the ordinary way. I like to be different ;)
Crashed wrote:
input("Drop what?") in T
if(!T)
return

Code.dm:98:error::invalid expression

Saying which line 98 is would be a helpful start here. But your input() is completely frelled up.

For starters: Why have you indented under it? The input() proc is not a control structure; it's not if() or while() or for().

Second, why didn't you do anything with the return value from the proc? That's kind of the whole point of calling it: using what it sends back.

Lummox JR
Crashed wrote:
Err me have trouble. I want to list all the items one has and then when one selects an item it drops on the floor under him, BUT i obviously under-estimated how hard this'd be and now i'm stuck.


mob/verb/Drop()
var/mob/list/T=list()
for(var/obj/O in usr)
T+=O
input("Drop what?") in T
if(!T)
return

Code.dm:98:error::invalid expression

mob/verb/Drop()
var/obj/list/T=list()
for(var/obj/O in src)T+=O
T+="Cancel"
var/obj/i=input("Drop what?") in T
if(i=="Cancel")return


try that