Problem with MXP callbacks

Posted by ForgottenMUD on Sat 08 Dec 2012 01:35 AM — 5 posts, 26,937 views.

Belgium #0
I can't get them to work. It doesn't do anything/catch MXP tags. I tried the following functions on my server as well as the Two Towers MUD, and none of them catch anything. Both servers implement MXP, which is not activated through a protocol handshake but with CTRL + ALT + U and "Yes - Always" so that might be the issue(?) I also reduced the world window to see if there wasn't a "Notepad" screen undernearth.

function OnMXPEndTag (name, text)
  AppendToNotepad ("MXP", "Closing tag: " .. name .. "\n")
  AppendToNotepad ("MXP", "Text: " .. text .. "\n")
end -- function


function OnMXPEndTag (name, text)
  Note("test")
end -- function


function OnMXPerror (level, number, line, message)
  if level == "E" and number ~= 1030 then 
    ColourNote ("white", "red", level .. "(" .. number .. "): " message)
  end if

-- do not display entities received (eg. < )
  if number == 20001 then 
     return 1
  end -- if

  return 0
end -- function
Australia Forum Administrator #1
Template:version
Please help us by advising the version of MUSHclient you are using. Use the Help menu -> About MUSHclient.
Australia Forum Administrator #2
Are these in a plugin or the main world file? If the main world file did you fill in the function names here:

Belgium #3
I'm using version 4.85. I call those functions in a plugin that does nothing but call them.
Australia Forum Administrator #4
You are not using the right function names.

http://www.gammon.com.au/scripts/doc.php?general=mxp_callbacks

The client looks for the exact names documented there.

For one thing, all plugin callbacks start with: OnPlugin ...