Welcome to the Builder Academy

Question Odd Bug - wpurge

  • Silvaria
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Writer, Builder, Artist, Newbie!Programmer
More
05 May 2013 04:09 - 05 May 2013 04:10 #2115 by Silvaria
Odd Bug - wpurge was created by Silvaria
Fizban was helping me out with a trigger earlier tonight, and we experienced an odd error. I wanted the trigger to load a mob with items in her inventory so she could be a shopkeeper, and then purge her after a set amount of time. Well, purging a mob lands its inventory on the floor, so Fiz came up with this to purge the inventory:

Code:
set nymph valiglicia_593 set inventory %nymph.inventory% while %inventory% set next %inventory.next_in_list% %purge% %inventory% set inventory %next% done

It returned this:

Code:
[ Room 59316 :: wpurge: bad argument ] [ Room 59316 :: wpurge: bad argument ] [ Room 59316 :: wpurge: bad argument ] [ Room 59316 :: wpurge: bad argument ]

He tried several other phrases, but they all sent back the same error. In the end, we set it up so that the shopkeeper teleports away, junks her inventory, teleports back, and purges herself.

If anyone needs to see the other errors and phrases, I have them logged. Just ask me!

Began building in July, 2012.

Began learning C in July, 2013.

Downloaded ROM and TBAmud in August, 2013.

Conversion nearly complete.
Last edit: 05 May 2013 04:10 by Silvaria.

Please Log in or Create an account to join the conversation.

More
05 May 2013 04:19 #2117 by Fizban
Replied by Fizban on topic Odd Bug - wpurge
The problem definitely lies with wpurge, not the script, I also tried a two-script configuration where the room script loaded the mob and a script on the mob itself handled all the purging, and that worked fine as well.

mpurge as such is able to purge items from a targets inventory, only wpurge isn't.

room scripts however can target the mobs inventory as echoing the following echoed as expected:

%echo% inventory.vnum: %inventory.vnum%

Please Log in or Create an account to join the conversation.

More
16 May 2013 04:31 #2305 by Vatiken
Replied by Vatiken on topic Odd Bug - wpurge
Don't know if this got fixed or not, and I'm out of the loop on updating the source code here but this will fix the problem.
Code:
--- dg_wldcmd.c (revision 354) +++ dg_wldcmd.c (working copy) @@ -399,7 +399,7 @@ ch = get_char_in_room(room, arg); if (!ch) { - if (obj && *arg == UID_CHAR) + if (*arg == UID_CHAR) obj = get_obj(arg); else obj = get_obj_in_room(room, arg); Index: db.c

tbaMUD developer/programmer

Please Log in or Create an account to join the conversation.

Time to create page: 0.198 seconds