This is the error I get
[ERROR] lua/autorun/client/cl_hud.lua:14: function arguments expected near 'end'
1. unknown - lua/autorun/client/cl_hud.lua:0
[CODE]function myhud()
local client = LocalPlayer()
if not client:Alive() then return end
if (client:GetActiveWeapon() == NULL or client:GetActiveWeapon() == "Camera") then return end
draw.RoundedBox(3, 5, 5, 200, 100, Color(51, 58, 51, 255))
draw.SimpleText(client:Health() .. "%", "ScoreboardText", 100, 50, Color(86, 104, 86, 255), 0, 0)
local mag_left = client:GetActiveWeapon():Clip1()
local mag_extra = client:GetAmmoCount(client:GetActiveWeapon():GetPrimaryAmmoType())
local secondary_ammo = client:GetAmmoCount(client:GetActiveWeapon():GetSecondaryAmmoType
end[/CODE]
And this is my code I can not find out what I am suppose put
[CODE]local secondary_ammo = client:GetAmmoCount(client:GetActiveWeapon():GetSecondaryAmmoType[/CODE]
should be
[CODE]local secondary_ammo = client:GetAmmoCount(client:GetActiveWeapon():GetSecondaryAmmoType())[/CODE]
because GetSecondaryAmmoType needs arguments (albeit empty), and a closing parentheses for GetAmmoCount.
Sorry, you need to Log In to post a reply to this thread.