• Lua error can somebody help!
    9 replies, posted
I keep getting lua error out ive looked over and over this script but i cant seem to find it i figure an extra set of fresh eyes would help can somebody look over this for me it was be awesome if somebody did [CODE]/*--------------------------------------------------------------------------- /*--------------------------------------------------------------------------- DarkRP custom jobs --------------------------------------------------------------------------- This file contains your custom jobs. This file should also contain jobs from DarkRP that you edited. Note: If you want to edit a default DarkRP job, first disable it in darkrp_config/disabled_defaults.lua Once you've done that, copy and paste the job to this file and edit it. The default jobs can be found here: <TODO: INSERT URL HERE> For examples and explanation please visit this wiki page: http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields Add jobs under the following line: ---------------------------------------------------------------------------*/ /*-------------------------------------------------------- Default teams. If you make a team above the citizen team, people will spawn with that team! --------------------------------------------------------*/ TEAM_MAYOR = AddExtraTeam("Mayor", Color(150, 20, 20, 255), "models/player/breen.mdl", [[The Mayor of the city creates laws to serve the greater good of the people. If you are the mayor you may create and accept warrants. Type /wanted <name> to warrant a player Type /jailpos to set the Jail Position Type /lockdown initiate a lockdown of the city. Everyone must be inside during a lockdown. The cops patrol the area /unlockdown to end a lockdown]], {}, "mayor", 1, 85, 0, true, false/*, {TEAM_CHIEF, TEAM_POLICE}*/) TEAM_HOBO = AddExtraTeam("Hobo", { color = Color(80, 45, 0, 255), model = "models/player/corpse1.mdl", description = [[The lowest member of society. All people that see you laugh. You have no home. Beg for your food and money Sing for everyone who passes to get money Make your own wooden home.]], weapons = {"weapon_bugbait"}, command = "hobo", max = 5, salary = 0, admin = 0, vote = false, hasLicense = false, }) TEAM_CITIZEN = AddExtraTeam("Citizen", { color = Color(20, 150, 20, 255), model = { "models/player/Group01/Female_01.mdl", "models/player/Group01/Female_02.mdl", "models/player/Group01/Female_03.mdl", "models/player/Group01/Female_04.mdl", "models/player/Group01/Female_06.mdl", "models/player/group01/male_01.mdl", "models/player/Group01/Male_02.mdl", "models/player/Group01/male_03.mdl", "models/player/Group01/Male_04.mdl", "models/player/Group01/Male_05.mdl", "models/player/Group01/Male_06.mdl", "models/player/Group01/Male_07.mdl", "models/player/Group01/Male_09.mdl" }, description = [[The Citizen is the most basic level of society you can hold besides being a hobo. You have no specific role in city life.]], weapons = {}, command = "citizen", max = 0, salary = 45, admin = 0, vote = false, hasLicense = false, }) TEAM_POLICE = AddExtraTeam("Civil Protection", { color = Color(25, 25, 170, 255), model = { "models/humans/nypd1940/male_01.mdl", "models/humans/nypd1940/male_02.mdl", "models/humans/nypd1940/male_03.mdl", "models/humans/nypd1940/male_04.mdl", "models/humans/nypd1940/male_05.mdl", "models/humans/nypd1940/male_06.mdl", "models/humans/nypd1940/male_07.mdl", "models/humans/nypd1940/male_08.mdl", "models/humans/nypd1940/male_09.mdl" }, description = [[The protector of every citizen that lives in the city . You have the power to arrest criminals and protect innocents. Hit them with your arrest baton to put them in jail Bash them with a stunstick and they might learn better than to disobey the law. The Battering Ram can break down the door of a criminal with a warrant for his/her arrest. The Battering Ram can also unfreeze frozen props(if enabled). Type /wanted <name> to alert the public to this criminal and type /warrant to request a warrant.]], weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker"}, command = "cp", max = 4, salary = 65, admin = 0, vote = true, hasLicense = true, }) TEAM_GANG = AddExtraTeam("Gangster", { color = Color(75, 75, 75, 255), model = { "models/player/Group03/Female_01.mdl", "models/player/Group03/Female_02.mdl", "models/player/Group03/Female_03.mdl", "models/player/Group03/Female_04.mdl", "models/player/Group03/Female_06.mdl", "models/player/Group03/Female_07.mdl", "models/player/group03/male_01.mdl", "models/player/Group03/Male_02.mdl", "models/player/Group03/male_03.mdl", "models/player/Group03/Male_04.mdl", "models/player/Group03/Male_05.mdl", "models/player/Group03/Male_06.mdl", "models/player/Group03/Male_07.mdl", "models/player/Group03/Male_08.mdl", "models/player/Group03/Male_09.mdl" }, description = [[The lowest person of crime. The Gangster Leader sets your agenda and you follow it or you might be punished. A gangster generally works for the Gangster Leader who runs the crime family. The Gangster Leader sets your agenda and you follow it or you might be punished.]], weapons = {}, command = "gangster", max = 5, salary = 45, admin = 0, vote = false, hasLicense = false, }) TEAM_GANGSTERLEADER = AddExtraTeam("Gangster Leader", { color = Color(25, 25, 25, 255), model = "models/player/gman_high.mdl", description = [[The Gangster Leader is the boss of the gangsters in the city. With his power he coordinates the gangsters and forms an efficent crime organization.]], weapons = {}, command = "gangleader", max = 1, salary = 60, admin = 0, vote = true, hasLicense = false, NeedToChangeFrom = TEAM_GANG, CustomCheckFailMsg = "You need to become a gangster first." }) TEAM_LIGHTGUNDEALER = AddExtraTeam("Light Arms Dealer", { color = Color(255, 140, 0, 255), model = "models/minson97/bo2/hudson/hudson_commando.mdl", description = [[A Light Gundealer is responsible for selling light arms to the public. /Buyshipment <name> to Buy a weapon shipment /Buygunlab to Buy a gunlab that spawns P228 pistols]], weapons = {}, command = "lightdealer", max = 3, salary = 45, admin = 0, vote = true, hasLicense = false, }) TEAM_HEAVYGUNDEALER = AddExtraTeam("Heavy Arms Dealer", { color = Color(255, 140, 0, 255), model = "models/jessev92/player/military/cod4_sniper.mdl", description = [[A Heavy Arms Dealer is responsible for selling heavy weapons to the public. /Buyshipment <name> to buy a weapon shipment. /Buygunlab to buy a gunlab that spawns P228 pistols.]], weapons = {}, command = "heavydealer", max = 2, salary = 45, admin = 0, vote = true, hasLicense = false, }) TEAM_DOCTOR = AddExtraTeam("Doctor", { color = Color(47, 79, 79, 255), model = "models/player/kleiner.mdl", description = [[If you are a medic you MUST heal anyone who asks. If you fail to do so they have the right to demote you. You are allowed to make them pay for each heal. (Try to make the prices reasonable)]], weapons = {"med_kit"}, command =
Between TEAM_POLICECHIEF and TEAM_HITMAN, you put TEAM_ADMIN all on one line and is not formatted correctly. Try this [code]TEAM_ADMIN = AddExtraTeam("Admin on Duty!", { color = Color(128, 0, 128, 255 ), model = { "models/player/harry_potter.mdl", "models/player/sumario_galaxy.mdl", "models/player/suluigi_galaxy.mdl", "models/player/nuggets.mdl", "models/player/teslapower.mdl", "models/player/sunabouzu.mdl", "models/player/shaun.mdl", "models/player/security_suit.mdl", "models/player/scarecrow.mdl", "models/player/zelda.mdl", "models/player/yoshi.mdl", "models/player/zerop.mdl", "models/player/zoey.mdl", "models/player/subzero.mdl", "models/player/skeleton.mdl", "models/player/scorpion.mdl", "models/player/samusz.mdl", "models/player/rorschach.mdl", "models/player/roman.mdl", "models/player/rayman.mdl", "models/player/niko.mdl", "models/player/midna.mdl", "models/player/mart.mdl", "models/player/macdguy.mdl", "models/player/leon.mdl", "models/player/knight.mdl", "models/player/jawa.mdl", "models/player/jack_sparrow.mdl", "models/player/hunter.mdl", "models/player/gordon.mdl", "models/player/gmt_shared.mdl", "models/player/gmen.mdl", "models/player/foohysaurusrex.mdl", "models/player/faith.mdl", "models/player/doomguy.mdl", "models/player/dishonored_assassin1.mdl", "models/player/clopsy.mdl", "models/player/chris.mdl", "models/player/chewbacca.mdl", "models/player/blockdude.mdl", "models/player/azuisleet1.mdl", "models/player/aphaztech.mdl", "models/player/altair.mdl", "models/player/billymays.mdl", } description = [[You Administrate the Server]], weapons = {"keys", "pocket", "weapon_keypadchecker", "gmod_tool", "arrest_stick", "unarrest_stick"}, command = "admin", max = 3, salary = 300, admin = 1, vote = false, })[/code]
now im getting this error [ERROR] lua/darkrp_customthings/jobs.lua:272: '}' expected (to close '{' at line 224) near 'description' 1. unknown - lua/darkrp_customthings/jobs.lua:0 after putting the above lines in
The error tells you the problem, if you know how tables are made. The code code_gs posted needs a comma after the model table is ended.
Okay so im now getting this error [ERROR] lua/darkrp_customthings/jobs.lua:365: '}' expected (to close '{' at line 351) near 'CustomCheckFailMsg' 1. unknown - lua/darkrp_customthings/jobs.lua:0
Ok, so now it's your turn to read the error and fix it.
[CODE] TEAM_ADMIN = AddExtraTeam("Admin on Duty!", { color = Color(128, 0, 128, 255 ), model = { "models/player/harry_potter.mdl", "models/player/sumario_galaxy.mdl", "models/player/suluigi_galaxy.mdl", "models/player/nuggets.mdl", "models/player/teslapower.mdl", "models/player/sunabouzu.mdl", "models/player/shaun.mdl", "models/player/security_suit.mdl", "models/player/scarecrow.mdl", "models/player/zelda.mdl", "models/player/yoshi.mdl", "models/player/zerop.mdl", "models/player/zoey.mdl", "models/player/subzero.mdl", "models/player/skeleton.mdl", "models/player/scorpion.mdl", "models/player/samusz.mdl", "models/player/rorschach.mdl", "models/player/roman.mdl", "models/player/rayman.mdl", "models/player/niko.mdl", "models/player/midna.mdl", "models/player/mart.mdl", "models/player/macdguy.mdl", "models/player/leon.mdl", "models/player/knight.mdl", "models/player/jawa.mdl", "models/player/jack_sparrow.mdl", "models/player/hunter.mdl", "models/player/gordon.mdl", "models/player/gmt_shared.mdl", "models/player/gmen.mdl", "models/player/foohysaurusrex.mdl", "models/player/faith.mdl", "models/player/doomguy.mdl", "models/player/dishonored_assassin1.mdl", "models/player/clopsy.mdl", "models/player/chris.mdl", "models/player/chewbacca.mdl", "models/player/blockdude.mdl", "models/player/azuisleet1.mdl", "models/player/aphaztech.mdl", "models/player/altair.mdl", "models/player/billymays.mdl" }, description = [[You Administrate the Server]], weapons = {"keys", "pocket", "weapon_keypadchecker", "gmod_tool", "arrest_stick", "unarrest_stick"}, command = "admin", max = 3, salary = 300, admin = 1, vote = false }) [/CODE]
[QUOTE=ms333;42613306]The error tells you the problem, if you know how tables are made. The code code_gs posted needs a comma after the model table is ended.[/QUOTE] Oopsie, thanks. [editline]23rd October 2013[/editline] Did you make this code? Because there are a lot of obvious, really simple format errors that could be fixed in 2 seconds. Between lines 314-495, place commas after customCheck= function(ply) codehere end[B],[/B] <--
Yeah i fixed it already i was extremely tired when i designed this but ive fixed them all today so this thread can be closed thanks guys!
[QUOTE=RNK;42626863]Yeah i fixed it already i was extremely tired when i designed this but ive fixed them all today so this thread can be closed thanks guys![/QUOTE] Please mark it as solved :)
Sorry, you need to Log In to post a reply to this thread.