mob
verb
Delete(obj/O in view())
if(usr.key)del(O)
else src<<"It's not yours."
Any help here?
-The Grimster
ID:272886
May 19 2009, 7:40 pm
|
|
So I got this delete code.It works,deleting stuff just fine.But it lets anyone delete it. I'm not sure how to direct it, so that only the person who creates such an object can delete it.
mob Any help here? -The Grimster |
May 19 2009, 7:44 pm
|
|
From what it looks like you're only checking if the person using the verb has a key which would let anyone delete it..What would work however is:
|
In response to Mecha Destroyer JD
|
|
Um,you're pretty bad at indenting XD.But thanks!I didn't know that's what I was doing.
-The Grimster |
In response to Mecha Destroyer JD
|
|
Oh wait, this code is bugged.It doesn't know who made the object =0.
|
In response to Gr1m d4 r34p3r
|
|
Gr1m d4 r34p3r wrote:
Um,you're pretty bad at indenting XD.But thanks!I didn't know that's what I was doing. Whatcha mean? On my screen his indents were perfect. If you were to copy/paste them though they'd look out of whack. |
In response to ChicoTheMan94
|
|
Yeah I kinda did =P.So I just retyped them.
|
In response to Gr1m d4 r34p3r
|
|
No, his example required SOME thinking.
mob/verb/Create(obj/o) |
In response to Gr1m d4 r34p3r
|
|
Gr1m d4 r34p3r wrote:
I didn't know that's what I was doing.That pretty much sums it up. You can't honestly expect to cut and paste an example someone's given and have it work immediately without figuring out how to use it, can you? You introduce an "owner" variable to the object to check for and don't expect to have to do anything else than declare it? Did you think the variable was just going to read your mind on what to be assigned to? Read the BYOND guide and understand it completely, use some common sense (I hear it's cheap on EBay these days), or give up entirely. Oh, and the phrase is "Racking one's brain" though in your case "wrecking" certainly seems reasonable. |