ID:172377
 
plz can u post a new version of this code that works and that adds and removes the item.

mob
verb
Drop()
var/item = (/obj/ in src)
var/dropit = input("do you want to drop the [item] ?") in list("yer,no")
if(dropit == "yer")
src << "you drop the [item]"
new/obj/[item](usr.loc)

Get(obj/i in view(0))
var/getit = input("pick up [i] ?") in list("yer","no")
if(getit == "yer")
new/obj/[i](usr)

i dont like the way the new way for the 'new' command
but anyways my get and drop system dont work and here are the errors

get and drop.dm:10::warning: operation has no effect here
get and drop.dm:10:usr :warning: unused label
get and drop.dm:10:loc :warning: unused label
get and drop.dm:14::warning: operation has no effect here
get and drop.dm:14:usr :warning: unused label


sorry about not being that clear but its late and my mind is giveing out on me.
Here var/dropit = input("do you want to drop the [item] ?") in list("yer,no") you need to make it ("yer","no") you forgot some quotation Marks.Im not sure if thats all your problems but i think its one of them.
In response to Turles9000
ok that got some of there errors heres whats left

get and drop.dm:10::warning: operation has no effect here
get and drop.dm:10:usr :warning: unused label
get and drop.dm:10:loc :warning: unused label
get and drop.dm:15::warning: operation has no effect here
get and drop.dm:15:usr :warning: unused label
var/item = (/obj/ in src)

And Wrongo was his name-o.
In response to Madpeter
You could do this, I didnt test this but it should work
mob
verb
Drop(O as obj in src.contents)//Says O is the object in the users inventory list
var/dropit = input("do you want to drop the [O] ?") in list("yer","no")
if(dropit == "yer")
src << "you drop the [O]"
O:loc = src.loc//Moves the item to under the player


Get(O as obj in oview(1))//Says that O is the object the player is picking up
var/getit = input("pick up [O] ?") in list("yer","no")
if(getit == "yer")
O:loc = src//Moves the item from the map into the player
In response to Turles9000
Colon bad. Use period.
In response to Turles9000
Turles9000 wrote:
Here var/dropit = input("do you want to drop the [item] ?") in list("yer,no") you need to make it ("yer","no") you forgot some quotation Marks.Im not sure if thats all your problems but i think its one of them.

It certainly isn't all of them. "Yes" is not spelled with an R. The only way "yer" could be counted as a word would be in a Western-type slang, i.e. something Yosemite Sam would say in place of "your" or "you're".

Lummox JR