Two Things

Gaming and Programming.. maybe programming for some games, who knows. Either way, I'm a geek, right?

Late Night LUA Reflections - WildStar Style

Small post.  Couple things I had to bang my head against before figuring out while working on my WildStar addons this weekend..

OnSave()

This little goody is what you can use to persist data from one load to the next.  It couples with OnRestore() which is nice and all, but only if OnSave() works.  It seems that when you do /reloadui, OnSave() might get called, but if you don't already have a saved settings file on your HD, it won't actually save anything.  A file is created when you log out to Character Select (or log out completely).  From that point forward, you can /reloadui all you want to and the settings file will update.  This is probably a bug.

ICCommLib

This is the addon communication library, not meant for humans, just for addons to pass data back and forth.  It has quite a few bugs, or just poor design choices.  One really can't tell with Carbine and Wildstar which is which.  One problem, after you connect to a channel, there's no way to leave it.  You will continue to get updates from that channel until some undetermined time when GC throws you out or maybe after you reload and the addon gets registered again.  In the interim you have to trap the channel at the message received level to make sure you want to process that message.

A second problem, when you send messages you get no echo of it, that part is fine, really.  Just need something like Rover or a second account to make sure data is passing.  The problem comes in that you have to wait about 3 seconds after joining the channel otherwise the message will fail to send.