PennMUSH Community

Ticket #7666 (new incoming)

Opened 3 months ago

Last modified 3 months ago

children() lacks permission

Reported by: parusso Assigned to:
Priority: minor Milestone:
Keywords: Cc:
Visibility: Public

Description

I have placed children() inside a function called lkids... located on an object set wizard. Unless wrapped with objeval() children() will not work as a function under p6 while under @function.

Function Library(#25TWbn) Type: THING Flags: WIZARD DEBUG NO_COMMAND Owner: One(#1PUWAC) Zone: *NOTHING* Pennies: 10 Parent: *NOTHING* Powers: Functions See_All Warnings checked: Created: Mon Jul 14 20:35:41 2008 Last Modification: Fri Jul 18 11:54:52 2008 DEBUGFORWARDLIST #4$i: #4 FUN #1`: FUN`LKIDS #4: objeval(%#,children(%0)) STARTUP #1$: @dolist lattr(%!/FUN**)=@function after(##,FUN)=%!,## Home: Game Room(#16RnJ) Location: One(#1PUWAC)

@function Report: Function Name Dbref # Attrib LKIDS 25 FUN`LKIDS

Change History

07/18/08 11:09:22 changed by Talvo

Did you try setting it debug and running it? The only reason I saw it failed for me on a Wizard object was because, after it had searched a couple of times, the wizard who owned it ran out of money (children() is basically just lsearch(), so it costs 100 pennies). The objeval() causes it to charge the owner (probably the behaviour you want, anyway), making it work again. (Setting it no_pay also works, but charging the person using it is probably better.)

07/18/08 18:34:15 changed by parusso

You were correct, when I powered object #25 NO_PAY, children() worked fine.