New Gamemode Shared.lua Error

Ok. Im TRYING to do the coding for this new gamemode. It uses the DarkRP base.

What I mean by that - Press F4 and the Jobs tab, enitites/weapons tab comes up etc.

I’m having trouble with coding the jobs. When I load the server the F4 options do not work.
Anybody that is good at coding, can you look at this coding I have done, and see if you find any errors?

The Gamemode is based on US army vs British army. Each team having different classes. They’re listed below:

British Army: British Soldier
Heavy British Gunner
British Sniper
British Demolition
British Leader
British Medic

American Army: American Soldier
American Heavy Gunner
American Sniper
American Demolition
American Leader
American Medic

This is the shared.lua file from my ArmyWars/gamemode/ folder.

Please help :slight_smile: Its annoying me as ive searched everything.

The player models used are all downloaded and extracted correctly, they’re not a problem. And all weapons used are from MadCow’s CS:S Swep Pack.

Thanks in advance!

The codes:

[lua]TEAM_British Soldier = AddExtraTeam(“British Soldier”, Color(0 128 0 255),“models/ussoldier/ussoldier.mdl”, [[A normal member of the british army.]], {“weapon_mad_aug”, “weapon_mad_deagle”, “weapon_mad_grenade”}, British Soldier, 10, 80, 0, true)
//
TEAM_American Soldie r= AddExtraTeam(“American Soldier”, Color(180 155 70 255),“models/humans/deltaforce/male_01.mdl”, [[A normal member of the american army.]], {“weapon_mad_m4”, “weapon_mad_deagle”, “weapon_mad_grenade”}, American Soldier, 10, 80, 0, true)
//
TEAM_American Heavy-Gunne r= AddExtraTeam(“American Heavy-Gunner”, Color(180 155 70 255),“models/humans/deltaforce/male_02.mdl”, [[A heavy gunner of the american army. Flatten the opposition’s defence with your LMG.]], {“weapon_mad_m249”, “weapon_mad_p228”, “weapon_mad_grenade”}, American Heavy-Gunner, 2, 95, 0, true)
//
TEAM_British Heavy-Gunner = AddExtraTeam(“British Heavy-Gunner”, Color(0 128 0 255),“models/Replic/Replicasol.mdl”, [[A heavy gunner of the british army. Flatten the opposition’s defence with your LMG.]], {“weapon_mad_m249”, “weapon_mad_p228”, “weapon_mad_grenade”}, British Heavy-Gunner, 2, 95, 0, true)
//
TEAM_British Leader = AddExtraTeam(“British Leader”, Color(0 128 0 255),“models/player/urban.mdl”, [[The leader of the british army. You control the whole of the British army, you give the commands, and you get the final say.]], {“weapon_mad_famas”, “weapon_mad_deagle”, “weapon_mad_grenade”}, British Leader, 1, 150, 0, true)
//
TEAM_American Leader = AddExtraTeam(“American Leader”, Color(150 120 45 255),“models/player/leet.mdl”, [[The leader of the american army. You control the whole of the American army, you give the commands, and you get the final say.]], {“weapon_mad_galil”, “weapon_mad_deagle”, “weapon_mad_grenade”}, American Leader, 1, 150, 0, true)
//
TEAM_American Sniper = AddExtraTeam(“American Sniper”, Color(180 155 70 255),“models/player/guerilla.mdl”, [[The sniper of the american army. Stay back and be patient. Fire when you want, or wait for orders.]], {“weapon_mad_g3”, “weapon_mad_usp”}, American Sniper, 2, 95, 0, true)
//
TEAM_British Sniper = AddExtraTeam(“British Sniper”, Color(180 155 70 255),“models/player/riot.mdl”, [[The sniper of the british army. Stay back and patient. Fire when you want, or wait for orders.]], {“weapon_mad_sg550”, “weapon_mad_usp”}, British Sniper, 2, 95, 0, true)
//
TEAM_British Medic = AddExtraTeam(“British Medic”, Color(0 128 0 255),“models/player/kleiner.mdl”, [[The medic of the british army. You can drop medkits by left clicking while holding the medkit. Heal your teammates and keep them alive!]], {“weapon_mad_ump”, “weapon_mad_medic”}, British Medic, 2, 85, 0, true)
//
TEAM_American Medic = AddExtraTeam(“American Medic”, Color(180 155 70 255),“models/player/magnusson.mdl”, [[The medic of the american army. You can drop medkits by left clicking while holding the medkit. Heal your teammates and keep them alive!]]], {“weapon_mad_ump”, “weapon_mad_medic”}, American Medic, 2, 85, 0, true)
//
TEAM_American Demolition = AddExtraTeam(“American Demolition”, Color(180 155 70 255),“models/player/swat.mdl”, [[The demoman of the american army. Close range and explosives is your style.]], {“weapon_mad_m3”, “weapon_mad_c4”}, American Demolition, 1, 90, 0, true)
//
TEAM_British Demolition = AddExtraTeam(“British Demolition”, Color(0 128 0 255),“models/player/gasmask.mdl”, [[The demoman of the british army. Up close and explosives is your style.]], {“weapon_mad_m3”, “weapon_mad_c4”}, British Demolition, 1, 90, 0, true)
//
TEAM_British SpecOps = AddExtraTeam(“British SpecOps”, Color(0 128 0 255),“models/hexing/ct_blkop.mdl”, [[The SpecOps of the british army. Go sneaky, and be sly. You have flashbangs and land mines which can be VERY useful.]], {“weapon_mad_mp5”, “weapon_mad_flash”, “weapon_mad_mine”}, British SpecOps, 1, 95, 0, true)
//
TEAM_American SpecOps = AddExtraTeam(“American SpecOps”, Color(180 155 70 255),“models/hexing/ct_blkop.mdl”, [[The SpecOps of the american army. Go sneaky, and be sly. You have flashbangs and land mines which can be VERY useful.]], {“weapon_mad_p90”, “weapon_mad_flash”, “weapon_mad_mine”}, American SpecOps, 1, 95, 0, true)
//
TEAM_Spectator = AddExtraTeam(“Spectator”, Color(255 0 255 255),“models/player/hostage/hostage_02.mdl”, [[You’re not on either team. Just spectate.]], {“weapon_mad_fists”}, Spectator, 20, 5, 0, false)
//
[/lua]

First off use [noparse][lua][/lua][/noparse] tags to post code, like so:
[lua]–Code here[/lua]

Second, to get better answers ask in the Newbie Questions forum.

Thanks.

I see why you would like to use the DarkRP base…mainly because it’s easier I’m guessing…but the gamemode would probably be better off if you started from scratch with help of friends =D

Any ideas on how to fix it, or could anybody here help me make it? :slight_smile:

Variables can’t have spaces in them. You also have a bunch of seemingly random - at the end of some lines.