Someone's zMUD problems became my MUSH problem!

Posted by Sleipner on Fri 12 Dec 2008 07:06 AM — 3 posts, 16,311 views.

Sweden #0
Someone posted a problem with their zMUD screwing up, and now it did the same to me, but with MUSH!

Here's what he/she/it posted;


Run-time error
Plugin: xStats_Detector (called from world: Aardwolf)
Function/Sub: process_prompt called by trigger
Reason: processing trigger ""
[string "Plugin"]:84: bad argument #1 to 'match' (string expected, got nil)
stack traceback:
        [C]: in function 'match'
        [string "Plugin"]:84: in function 'do_pair'
        [string "Plugin"]:113: in function <[string "Plugin"]:91>
Error context in script:
  80 :     
  81 : require "var"
  82 : 
  83 : function do_pair (item)
  84*:   return string.match (item, "(%d+)%/(%d+)")
  85 : end -- do_pair
  86 :    
  87 : function capitalize (s)
  88 :   return string.sub (s, 1, 1):upper () .. string.sub (s, 2):lower ()


It made a red bar with the line:

Trigger function "process_prompt" not found or had a previous error.

This pops up whenever i hit enter or input a command.
It's after the prompt appears. Anyone know how to fix this?
USA #1
change the line to read:


return string.match ( (item or ""), "(%d+)%/(%d+)")


I haven't gone through the stats detector plugin to see how a nil is sneaking through, but that will circumvent the error.
Sweden #2
Thanks!
Dunno if that's what did it, or me re-booting MUSH after inserting what you wrote, but any of it did the trick! =)