ID:172605
![]() Apr 19 2004, 8:34 am
|
|
In my code, I need to talk to a guy once I have my item to get something. So I have it locate the item, then after the chatterbox says his stuff, its supposed to delete it, and give you a new item. While geting a new item work I cant get it to locate or delete the old item. Please help.
|
![]() Apr 19 2004, 11:07 am
|
|
Please can anyone help???
|
Well, you need the locate proc. IE
mob/verb/blah() I think that should work. ~Cheuq |
its not really code related, i just need to know how to locate if an item is in ur inventory and how to get it deleted correctly.
|
So will this work?
(there is preceeding text) else if(usr.retriever == 0 && usr.informant == 3 && usr.gotitem1 == 1) |
Metroid wrote:
So will this work? > else if(usr.retriever == 0 && usr.informant == 3 && usr.gotitem1 == 1) Try it yourself... but after the locate() should be in usr, so it knows where its looking for the ruby. |
I get
People.dm:62:error:Rubyoflettergal: compile failed (possible infinite cross-reference loop) People.dm:66:error:Rubyoflettergal: compile failed (possible infinite cross-reference loop) People.dm:66:error:Rubyoflettergal: compile failed (possible infinite cross-reference loop) |
You're doing var/obj/whatever/rubyofwhatever
You should make the variable a letter so var/obj/whatever/rubyofwhatever/R = locate(R) in usr ~BLeh |
Oh okay, sorry. Ive never done this type before so im kinda confused.\
EDIT so if I do var/obj/quest/rubyoflettergal/R =locate(R) in usr to delete it i put if(R) del R right? |
Once again, why don't you try it before you ask and post back when you have problems?
if(R) del R Checks to see if R exists and if it doesn't it deletes it. if(!R) would check to see if R wasn't there. ...~Cheuq |