• DarkRP HUD
    3 replies, posted
Hello, i'm trying to learn Lua but i'm getting errors while im trying to add a players rank at their name: local function GetUserGroup(ply) LocalPlayer()isUserGroup("user") then draw.DrawText(UserGroup, "DarkRPHUD2", pos.x + 2, pos.y - 42 Color(255, 0, 0, 255), 1) else end end and the follow error in console: [ERROR] gamemodes/darkrp/gamemode/client/hud.lua:295: unexpected symbol near 'then' 1. unknown - gamemodes/darkrp/gamemode/client/hud.lua:0
Add ":" after LocalPlayer()
And, you know, put "if" before LocalPlayer() and check if variable "UserGroup" even exists and check if you are actually running this code inside a HUDDraw hook. And variable "pos" doesn't seem to exist either.
[QUOTE=Robotboy655;40827099]And, you know, put "if" before LocalPlayer() and check if variable "UserGroup" even exists and check if you are actually running this code inside a HUDDraw hook. And variable "pos" doesn't seem to exist either.[/QUOTE] Random "else" after draw.DrawText() is strange aswell.
Sorry, you need to Log In to post a reply to this thread.