PDA

View Full Version : OOB Issue



Nickademus
July 24th, 2017, 21:06
I'm not really sure what is going on here. I've been using OOB message quite frequently, but today I had one refuse to work. I'm getting the error message in chat on the player's side: "[ERROR] Unknown special message type received. (oldSchoolRefresh)", which means that the message type wasn't registered with the OOBManager script object. The problem is, it was. I have this in the onInit of the player's window script along with other OOB registers:

OOBManager.registerOOBMsgHandler("oldSchoolRefresh", refreshPCinitiative);
The other messages all work, but this one isn't registering for some reason. I've checked for typos in the sending message, but I literally copy/paste the type name from the register code, so no typos. The sending is obviously working because the player's side gets the message and knows the name of the message type.

I have no clue about this one...

Moon Wizard
July 25th, 2017, 01:04
My guess is that the handler has not been registered at the time you think it has, or it has been removed before the OOB call is made. I think OOB handlers work easiest when tied to global scripts vs. specific windows. It's easier to know it's always available.

I would start by putting Debug.console statements before the handler registration and before the OOB call. From there, I might extract CoreRPG, and insert Debug lines in manager_oob.lua to see why it's not finding anything.

Regards,
JPG

Nickademus
July 25th, 2017, 01:23
I have the window open (and thus initialize) onDesktopInit, which is well before combat starts. I don't remove the handler during combat so it should be there. I also put a debug chat message at the time of the OOB register. It appeared in chat before the extension announcement did.

I might have to walk through CoreRPG to find what is going on...

Nickademus
July 25th, 2017, 21:24
Yeah, so something was borked here. I changed the name of the handler function to "xxxx" and it worked; literally that's all I did. Yet FG was throwing errors in the handler function for each function call it had to make. Yet when I copy/pasted the code directly from the functions being called into the handler function, it worked. No error was thrown for the functions called in the copy/pasted code.

I have no idea. It all works now so whatever. (I hope it stays that way.)