ID:144262
 
Code:
mob
verb
cook()
var/cooking = input("What would you like to make?")in list("Spaghetti","Popo Puffs and Milk","PB&J Sandwich","Cancel")
if(cooking == "Spaghetti")
if(obj/spaghettinoodles && obj/tomatosauce && obj/groundbeef in usr.contents)
new/obj/spaghetti(usr)
del(obj/spaghettinoodles in usr.contents)
del(obj/groundbeef in usr.contents)
del(obj/tomatosauce in usr.contents)
if(cooking == "Popo Puffs and Milk")
if(obj/popopuffs && obj/milk in usr.contents)
new/obj/popopuffsmilk(usr)
del(obj/popopuffs in usr.contents)
del(obj/milk in usr.contents)
if(cooking == "PB&J Sandwich")
if(obj/pbnjswirl && obj/bread in usr.contents)
new/obj/pbj(usr)
del(obj/pbnjswirl in usr.contents)
del(obj/bread in usr.contents)


Problem description:
When I compile the code, I get 28 "undefined var" errors.
Can somebody help me?

What are the errors?

In response to BEVAN
These are the errors:
loading N-builddemo.dme
cooking.dm:6:error:obj:undefined var
cooking.dm:6:error:spaghettinoodles:undefined var
cooking.dm:6:error:obj:undefined var
cooking.dm:6:error:tomatosauce:undefined var
cooking.dm:6:error:obj:undefined var
cooking.dm:6:error:groundbeef:undefined var
cooking.dm:8:error:obj:undefined var
cooking.dm:8:error:spaghettinoodles:undefined var
cooking.dm:9:error:obj:undefined var
etc.etc.etc
There all the same.
In response to Armiris
Try putting this like 3 lines down from your code

var/cooking

EDIT:
Or
mob/var/cooking

If the other doesent work.
In response to BEVAN
Already have the "cooking" var set.
And I also fixed your obj code.
mob
verb
cook()
var/cooking == input("What would you like to make?")in list("Spaghetti","Popo Puffs and Milk","PB&J Sandwich","Cancel")
if(cooking == "Spaghetti")
if(obj/spaghettinoodles && obj/tomatosauce && obj/groundbeef in usr.contents)
new/obj/spaghetti(usr)
del(obj/spaghettinoodles in usr.contents)
del(obj/groundbeef in usr.contents)
del(obj/tomatosauce in usr.contents)
if(cooking == "Popo Puffs and Milk")
if(obj/popopuffs && obj/milk in usr.contents)
new/obj/popopuffsmilk(usr)
del(obj/popopuffs in usr.contents)
del(obj/milk in usr.contents)
if(cooking == "PB&J Sandwich")
if(obj/pbnjswirl && obj/bread in usr.contents)
new/obj/pbj(usr)
del(obj/pbnjswirl in usr.contents)
del(obj/bread in usr.contents)


Maybe that will work?
In response to BEVAN
that is the code I'm using already
In response to Armiris
No o.o

Its a lil diffrent xD

Tiny lil bit......

At the top near input it has
=

try putting
==

I get mixed up between them, It fixes allot of errors tho..

Btw,

Drop + Get code still dont work,
Errors.
In response to BEVAN
what are your errors?
In response to BEVAN
that code you gave me adds 5 errors and makes no sense. I want it to definke the "cooking" var as one of the choices.
In response to Armiris
Nvm those errors xD
I noticed the code had something rong in it,
But....

heres my new erros >.<

    verb/Drop()
set category = "Commands"
set src in usr
src.loc = usr.loc
src.Owner = usr.key
view() << "[usr] drops the [src]"

Errors:

AP-And-other Crap.dm:587:error:verb/Drop:undefined var
MAP-And-other Crap.dm:587::warning: operation has no effect here
MAP-And-other Crap.dm:588:= :warning: assignment of procedural properties takes place at compile-time. Move this to the top of the procedure to avoid this warning.
MAP-And-other Crap.dm:589:in :warning: assignment of procedural properties takes place at compile-time. Move this to the top of the procedure to avoid this warning.

Dragon-Chat-REBORN.dmb - 1 error, 3 warnings (double-click on an error to jump to it)
In response to BEVAN
let's continue the drop-and-get verbs conversation in your thread
and read my other post.
could someone help me?
In response to Armiris
You are missing the / marks before the deletion.

 del (/obj/whatever in usr.contents) //assuming this is a verb, i put usr, anyway you need the / mark before it
Bevan, perhaps it would be better if you didn't post if you don't know what your doing. If you honestly can't desipher the difference between = and ==, you should really think again before helping him. It could possibly mess him up even more. It is good that you want to help though :D
In response to Beatmewithastick
True, make sure you know what you're talking about before you post help. Though in this case, I would say it unfair if he ocassionally confuses 2 [similar] operators - it doesn't necessarily mean he has no idea what he's doing. :)
Though unfortunately, this post [link] pretty much does mean that. >_>