• jobs.lua
    5 replies, posted
my jobs . lua wont load and says [ERROR] Lua is unable to understand file "darkrp_customthings/jobs.lua" because its author made a mistake around line number 22. The best help I can give you is this: Right before the '}', Lua expected to read a ')', but it didn't. Hints: - Did you forget a keyword? - Did you forget a comma? ------- End of Simplerr error ------- this is my jobs.lua [url]http://pastebin.com/25xASsLu[/url]
model = "models/player/combine_super_soldier.mdl",
[QUOTE=Invule;50787845]model = "models/player/combine_super_soldier.mdl",[/QUOTE] ???
Read the error for yourself. On line 22, you have random parenthesis around your model string.
[QUOTE=code_gs;50788199]Read the error for yourself. On line 22, you have random parenthesis around your model string.[/QUOTE] That is valid code though. Would not cause an error. The problem is on lines 167, 197, and 232. )) should be }) and line 232 should be } [URL="http://pastebin.com/raw/9GE1FB6k"]Fixed version[/URL]
[CODE]TEAM_OWNER = DarkRP.createJob("Owner On Duty", { color = Color(255, 0, 0, 255), model = ("models/player/combine_super_soldier.mdl"), description = [[The Owner]], weapons = {"m9k_suicide_bomb", "m9k_striker12", "m9k_minigun", "weapon_vape_mega", "weapon_vape_juicy", "weapon_keypadchecker"}, command = "Owner", max = 1, salary = 0, admin = 2, vote = false, hasLicense = true, candemote = true, -- CustomCheck medic = false, chief = false, mayor = false, hobo = false, cook = false, category = "Admins", }) [/CODE] Change to: [CODE] TEAM_OWNER = DarkRP.createJob("Owner On Duty", { color = Color(255, 0, 0, 255), model = "models/player/combine_super_soldier.mdl", description = [[The Owner]], weapons = {"m9k_suicide_bomb", "m9k_striker12", "m9k_minigun", "weapon_vape_mega", "weapon_vape_juicy", "weapon_keypadchecker"}, command = "Owner", max = 1, salary = 0, admin = 2, vote = false, hasLicense = true, candemote = true, -- CustomCheck medic = false, chief = false, mayor = false, hobo = false, cook = false, category = "Admins", }) [/CODE] {} brackets following to model = means you're going to be applying multiple models to the given job. IE: [CODE] TEAM_OWNER = DarkRP.createJob("Owner On Duty", { color = Color(255, 0, 0, 255), model = { "models/player/combine_super_soldier1.mdl", "models/player/combine_super_soldier2.mdl", "models/player/combine_super_soldier3.mdl", "models/player/combine_super_soldier4.mdl" }, description = [[The Owner]], weapons = {"m9k_suicide_bomb", "m9k_striker12", "m9k_minigun", "weapon_vape_mega", "weapon_vape_juicy", "weapon_keypadchecker"}, command = "Owner", [/CODE]
Sorry, you need to Log In to post a reply to this thread.