I’m trying to get an addon of mine - Easy Portal Advert - to work with WOTLK Classic, but it’s proving to be more troublesome than I thought. I am plagued with bugs and technical issues that just don’t make any sense to me with regards as to why they are happening, and I’m growing ever more impatient by the day.
Ok first things first. You set your initial EPAConfig values in portalservice_OnLoad function. But do you call this function anywhere in you code? I can’t find any other reference. This might explain why it has some nils.
As for the other error, the word ‘self’ in this case is not meant to be understood as literal variable name, it is a placeholder for the object name you are calling a function from. This error means you are putting the wrong parameters in the function call. I think the problem is you are trying to put a number type to function that expects text. You have this line: local text = tonumber(EasyPortalAdvert.PortalPrice) and it doesn’t seem to make sense, you convert number to a number and then try to pass it as text. I think you should use tostring() instead of tonumber() here.