Topic
[RESOLVED] I thought I'd squashed this bug, but no...
|
|
Edited by Luxxoria on 01/05/12 09:53 (BST)
EDIT: It would appear that there is a problem with the Curse website. The new version of EPA (which this post refers to) doesn't appear to be on the addon's page, despite the fact it has been approved by Curse staff. However, this bug still exists, and I would still like it squashed.
I recently updated my EasyPortalAdvert addon. Within hours of it going live on Curse, a ticket is posted detailing a bug I thought I had squashed in the previous version. The person who reported the bug pasted this error message. I have no idea how this is happening, but it would appear this bug rears its ugly head with each new version of EPA. I want to crush this thing once and for all, and any help is appreciated. Here is EasyPortalAdvert.lua as it stands right now: http://pastebin.com/dApxcU3A I'm probably making a really stupid mistake here, but I can't see it. If someone could look at the code and tell me where I've went wrong, that would be great. |
|
|
I'm not good at lua. I know almost nothing. But what happens if you leave out rows 8 to 10?
|
|
|
Edited by Prr on 30/04/12 13:42 (BST)
As it seems you are calling an element of EPAConfig, which can be a nil value here. So I think the following change to lines 8 to 10 should fix it:
if EPAConfig and (EPAConfig.PerPerson == nil or EPAConfig.PerPerson == "") thenIt is a nil value especially when someone did not use your addon before. Assuming that EPAConfig is stored in your saved variables. ;-) Another solution would be to swap this if-clause with the following one. Since after the following if-clause EPAConfig is definitely initialised. |
|
|
I changed the start of EasyPortalAdvert.lua to read
Then I deleted my own Saved Variables and logged into my Mage. No errors. So it would appear that I have managed to crush this bug. Thanks for your help, everyone! |
