Share your scripts and packages with other Mudlet users.
karhuso
Posts: 4 Joined: Fri Nov 11, 2011 7:49 pm
Post
by karhuso » Fri Jan 29, 2021 3:24 pm
Hi,
why do I get this error "
Lua syntax error:[string "Script: Gauges"]:37: attempt to call method 'setStyleSheet' (a nil value) " after editing Gauges?
GUI.Footer = Geyser.HBox:new({
name = "GUI.Footer",
x = 0, y = 0,
width = "100%",
height = "100%",
},GUI.Bottom)
GUI.LeftColumn = Geyser.VBox:new({
name = "GUI.LeftColumn",
},GUI.Footer)
GUI.RightColumn = Geyser.VBox:new({
name = "GUI.RightColumn",
},GUI.Footer)
GUI.GaugeBackCSS = CSSMan.new([[
background-color: rgba(0,0,0,0);
border-style: solid;
border-color: white;
border-width: 1px;
border-radius: 5px;
margin: 5px;
]])
GUI.GaugeFrontCSS = CSSMan.new([[
background-color: rgba(0,0,0,0);
border-style: solid;
border-color: white;
border-width: 1px;
border-radius: 5px;
margin: 5px;
]])
GUI.Health = Geyser.Gauge:new({
name = "GUI.Health",
},GUI.LeftColumn)
GUI.Health.back:setStyleSheet(GUI.GaugeBackCSS:getCSS())
GUI.GaugeFrontCSS:set("background-color","red")
GUI.Health.front:setStyleSheet(GUI.GaugeFrontCSS:getCSS())
GUI.Health:setValue(atcp.AvalonTP, atcp.AvalonMAXTP)
GUI.Health.front:echo("GUI.Health")