Thanks Doridion, I can pretty much confirm using addConnector (on the correct field)
on an item, only, will produce this error. I just tried added an event to many weapons, armor, and gear,
starting with meleeattack on a long sword and I get
map is nil.
I use add/removeConnector() (not in the editor but manually in scripts) hundreds of times in my module with everything from the
party to
push blocks to
floor/plate triggers to
doors and buttons but it seems
items refuse to accept these events. Again, any of these hooks will work fine if they're added using defineObject in the Class block.
FYI to those wondering why I manually script all my event hooks and don't just use the editor: because I use a
loader that pulls all my external files into the game, the editor doesn't recognize there's functions inside the file; so the drop down menu never gets populated with all the functions in these external files. Not looking for a fix for this though. I prefer this method and it helps force me to remain organized. ha! ~cheers~