Update for anybody using Syrennia's GUI

edited January 2017 in Mechanic's Corner
I thought that this may be helpful for anybody who has run into the same issues as I have, and since it does not appear that Syrennia will be coming back, as her thread has been cut.

I was running into a lot of issues with elements loading, and have spent the last few weeks going line by line and using the Mudlet debugger to troubleshoot.

Turns out, it is an easy fix, if you are having the same issues I have been. Simply, remove everything that is dealing with Endurance and Willpower. As these are no longer stored values in GMCP, it break when trying to convert "tonumber()", so if you remove it all, it works again. 

I have spent countless hours recoding to no avail, and so I went line by line creating many aliases to pull GMCP for every variable Syrennia had written out, as I saw it was not executing the updateGauges() function. The Endurance and Willpower pulled back Nil, and that shed light to me on what was going on.

Here is the primary culprit, for anybody needing a little more direction:

function updateGauges()
Remove--> local ep, mep = tonumber(gmcp.Char.Vitals.ep), tonumber(gmcp.Char.Vitals.maxep)
Remove--> local wp, mwp = tonumber(gmcp.Char.Vitals.wp), tonumber(gmcp.Char.Vitals.maxwp)
Remove--> local php, pmp, pep, pwp = math.floor((hp/mhp)*100), math.floor((mp/mmp)*100), math.floor((ep/mep)*100), math.floor((wp/mwp)*100)
Add--> local php, pmp = math.floor((hp/mhp)*100), math.floor((mp/mmp)*100)

Remove-->endText = " End: "..ep.."/"..mep.." ("..pep.."%)"
Remove-->if pep > 100 then setGauge("endBar", 100, 100, endText) else setGauge("endBar", ep, mep, endText) end
Remove-->willText = " Will: "..wp.."/"..mwp.." ("..pwp.."%)"
Remove-->if pwp > 100 then setGauge("willBar", 100, 100, willText) else setGauge("willBar", wp, mwp, willText) end

Note: You will also need to remove or comment out the items in the createGauges() function or Endurance and Willpower, so it does not draw the elements, and you will need to check through the resizeGauges() to remove the Endurance and Willpower variables for sizing. This SHOULD get you started, if not entirely fixed. 

I hope this can help somebody else so they don't have to pull their hair out like I have been. :smile: 
image
Sign In or Register to comment.