I have quite a few errors on my DarkRP server but can't seem to find out why?
The first one:
Server Console Msg: [ERROR] addons/darkrpmodification/lua/darkrp_customthings/shipments.lua:251: unexpected symbol near '<eof>'.
That file:
[lua]
/*---------------------------------------------------------------------------
DarkRP custom shipments and guns
---------------------------------------------------------------------------
This file contains your custom shipments and guns.
This file should also contain shipments and guns from DarkRP that you edited.
Note: If you want to edit a default DarkRP shipment, first disable it in darkrp_config/disabled_defaults.lua
Once you've done that, copy and paste the shipment to this file and edit it.
The default shipments and guns can be found here:
[url]https://github.com/FPtje/DarkRP/blob/master/gamemode/config/addentities.lua[/url]
For examples and explanation please visit this wiki page:
[url]http://wiki.darkrp.com/index.php/DarkRP:CustomShipmentFields[/url]
Add shipments and guns under the following line:
---------------------------------------------------------------------------*/
DarkRP.createShipment("Deagle", {
model = "models/weapons/w_tcom_deagle.mdl", -- The model of the item that hovers above the shipment
entity = "m9k_deagle", -- the entity that comes out of the shipment
price = 1000, -- the price of one shipment
amount = 10, -- how many of the item go in one purchased shipment
separate = true, -- whether the item is sold separately (usually used for guns)
pricesep = 150, -- the price of a separately sold item
noship = false, -- whether this item has a shipment
allowed = {TEAM_HGUN}, -- OPTIONAL, which teams are allowed to buy this shipment/separate gun
shipmodel = "models/items/item_item_crate.mdl", -- OPTIONAL, the model of the shipment (this crate is the default)
//customCheck = function(ply) return ply:Frags() < 10 end, -- OPTIONAL, extra conditions before people can purchase the shipment or separate item
//weight = 15, -- OPTIONAL, the weight of the shipment. The default is the weight of the shipment
//spareammo = 10, -- OPTIONAL, Add ammo to the default amount of ammo for every weapon
//clip1 = 10, -- OPTIONAL, The amount of bullets in the primary clip by default
//clip2 = 10, -- OPTIONAL, The amount of bullets in the secondary clip by default
//buttonColor = Color(255, 255, 255, 255), -- Optional: The color of the button in the F4 menu,
//label = "Deagle", -- Optional: the text on the button in the F4 menu
DarkRP.createShipment("M4A1", {
model = "models/weapons/w_m4a1_iron.mdl", -- The model of the item that hovers above the shipment
entity = "m9k_m4a1", -- the entity that comes out of the shipment
price = 5000, -- the price of one shipment
amount = 10, -- how many of the item go in one purchased shipment
separate = true, -- whether the item is sold separately (usually used for guns)
pricesep = 500, -- the price of a separately sold item
noship = false, -- whether this item has a shipment
allowed = {TEAM_HGUN}, -- OPTIONAL, which teams are allowed to buy this shipment/separate gun
shipmodel = "models/items/item_item_crate.mdl", -- OPTIONAL, the model of the shipment (this crate is the default)
//customCheck = function(ply) return ply:Frags() < 10 end, -- OPTIONAL, extra conditions before people can purchase the shipment or separate item
//weight = 15, -- OPTIONAL, the weight of the shipment. The default is the weight of the shipment
//spareammo = 10, -- OPTIONAL, Add ammo to the default amount of ammo for every weapon
//clip1 = 10, -- OPTIONAL, The amount of bullets in the primary clip by default
//clip2 = 10, -- OPTIONAL, The amount of bullets in the secondary clip by default
//buttonColor = Color(255, 255, 255, 255), -- Optional: The color of the button in the F4 menu,
//label = "Deagle", -- Optional: the text on the button in the F4 menu
DarkRP.createShipment("AK47", {
model = "models/weapons/w_ak47_m9k.mdl", -- The model of the item that hovers above the shipment
entity = "m9k_m4a1", -- the entity that comes out of the shipment
price = 5000, -- the price of one shipment
amount = 10, -- how many of the item go in one purchased shipment
separate = true, -- whether the item is sold separately (usually used for guns)
pricesep = 500, -- the price of a separately sold item
noship = false, -- whether this item has a shipment
allowed = {TEAM_HGUN}, -- OPTIONAL, which teams are allowed to buy this shipment/separate gun
shipmodel = "models/items/item_item_crate.mdl", -- OPTIONAL, the model of the shipment (this crate is the default)
//customCheck = function(ply) return ply:Frags() < 10 end, -- OPTIONAL, extra conditions before people can purchase the shipment or separate item
//weight = 15, -- OPTIONAL, the weight of the shipment. The default is the weight of the shipment
//spareammo = 10, -- OPTIONAL, Add ammo to the default amount of ammo for every weapon
//clip1 = 10, -- OPTIONAL, The amount of bullets in the primary clip by default
//clip2 = 10, -- OPTIONAL, The amount of bullets in the secondary clip by default
//buttonColor = Color(255, 255, 255, 255), -- Optional: The color of the button in the F4 menu,
//label = "Deagle", -- Optional: the text on the button in the F4 menu
DarkRP.createShipment("ACR", {
model = "models/weapons/w_masada_acr.mdl", -- The model of the item that hovers above the shipment
entity = "m9k_acr", -- the entity that comes out of the shipment
price = 5500, -- the price of one shipment
amount = 10, -- how many of the item go in one purchased shipment
separate = true, -- whether the item is sold separately (usually used for guns)
pricesep = 600, -- the price of a separately sold item
noship = false, -- whether this item has a shipment
allowed = {TEAM_HGUN}, -- OPTIONAL, which teams are allowed to buy this shipment/separate gun
shipmodel = "models/items/item_item_crate.mdl", -- OPTIONAL, the model of the shipment (this crate is the default)
//customCheck = function(ply) return ply:Frags() < 10 end, -- OPTIONAL, extra conditions before people can purchase the shipment or separate item
//weight = 15, -- OPTIONAL, the weight of the shipment. The default is the weight of the shipment
//spareammo = 10, -- OPTIONAL, Add ammo to the default amount of ammo for every weapon
//clip1 = 10, -- OPTIONAL, The amount of bullets in the primary clip by default
//clip2 = 10, -- OPTIONAL, The amount of bullets in the secondary clip by default
//buttonColor = Color(255, 255, 255, 255), -- Optional: The color of the button in the F4 menu,
//label = "Deagle", -- Optional: the text on the button in the F4 menu
DarkRP.createShipment("Thompson Contender", {
model = "models/weapons/w_g2_contender.mdl", -- The model of the item that hovers above the shipment
entity = "m9k_contender", -- the entity that comes out of the shipment
price = 7000, -- the price of one shipment
amount = 10, -- how many of the item go in one purchased shipment
separate = true, -- whether the item is sold separately (usually used for guns)
pricesep = 800, -- the price of a separately sold item
noship = false, -- whether this item has a shipment
allowed = {TEAM_HGUN}, -- OPTIONAL, which teams are allowed to buy this shipment/separate gun
shipmodel = "models/items/item_item_crate.mdl", -- OPTIONAL, the model of the shipment (this crate is the default)
//customCheck = function(ply) return ply:Frags() < 10 end, -- OPTIONAL, extra conditions before people can purchase the shipment or separate item
//we
<eof> stands for "End of File" and means that you forgot to close some bracket somewhere.
In your case, you forgot a closing bracket on EVERY createShipment call. After every
[code]label = [/code]
line, add a '}', without quotes obviously.
For your 2nd error, I can't spot the mistakes.
In your last piece of code, add a comma on line 153 (behind NeedToChangeFrom = TEAM_POLICE.
The problem here seems to be that you are using DarkRP.
Ohh, okay, thanks for help on that one! I am guessing I have to have a } at the end of each shipment?
EDIT: And a normal )
[editline]24th July 2014[/editline]
Hmmm, the only thing I need now is the fact that it expects a function argument near or....
What this supposed to do? [CODE]ply:IsUserGroup(ing">"mod")[/CODE] I believe it is you issue.
[QUOTE=Dinnanid;45485517]What this supposed to do? [CODE]ply:IsUserGroup(ing">"mod")[/CODE] I believe it is you issue.[/QUOTE]
No, that is Facepunch's code parser fucking up. It's the website doing that, not his actual code.
Yep, everything works fine now, nothing is wrong on the server.
In the end I changed that line of code to
[lua]
customCheck = function(ply) return ply:GetNWString("usergroup") == "owner" or "superadmin" or "admin" or "mod" (and whatever else I wanted here) end,
CustomCheckFailMsg = "(message)"
[/lua]
I think doing it that way works better, I'm not sure though, might just be me...
Edit: I meant to put agree on the post above, not disagree xD
[QUOTE=~RogerThat;45488784]Yep, everything works fine now, nothing is wrong on the server.
In the end I changed that line of code to
[lua]
customCheck = function(ply) return ply:GetNWString("usergroup") == "owner" or "superadmin" or "admin" or "mod" (and whatever else I wanted here) end,
CustomCheckFailMsg = "(message)"
[/lua]
I think doing it that way works better, I'm not sure though, might just be me...
Edit: I meant to put agree on the post above, not disagree xD[/QUOTE]
In the future, refresh the page and you can change your rating.
Sorry, you need to Log In to post a reply to this thread.