WeakAuras Health bar
Okay so ive been trying to make a healthbar useing a Ragebar i found in a youtube video. this is the code:
Code:
function(progress, r1, g1, b1, a1, r2, g2, b2, a2) Code:
function(progress, r1, g1, b1, a1, r2, g2, b2, a2) |
The second line would need to be:
Code:
local player_health = UnitHealth("player") |
Quote:
Quote:
[string " return function(progress, r1, g1, b1, a1, r2, b2, a2)..."]:15: 'end' expected(to close 'function' at line1) near '<eof>' got any idea what this error means? |
Put an 'end' before the return statement.
|
function(progress, r1, g1, b1, a1, r2, g2, b2, a2)
local player_health = UnitHealth("player" ) local red, green, blue = 0,0,0 if player_health > 60 then red, green, blue = 0,1,0 elseif player_health > 20 then red,green,blue = 0,1,1 else red,green,blue = 1,0,0 end return red, green, blue, 1 like this i guess, gives the error: [string " return function(progress, r1, g1, b1, a1, r2, b2, a2)..."]:16: 'end' expected(to close 'function' at line1) near '<eof> does the "if player_health > 60 then" need to be something else? like "if player_health% > 60% then"? |
No, you removed the end that closes the function when you added the end to close the if statement..
Lua Code:
|
Thank you very much..
|
All times are GMT -6. The time now is 07:44 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI