• Pointshop-Error
    24 replies, posted
Clean copy of pointshop, gives me this console error: [code] [ERROR] addons/pointshop-master/lua/sv_pointshop.lua:130: attempt to index field 'Config' (a nil value) 1. unknown - addons/pointshop-master/lua/sv_pointshop.lua:130 2. include - [C]:-1 3. unknown - addons/pointshop-master/lua/autorun/pointshop.lua:18 [ERROR] addons/pointshop-master/lua/sh_pointshop.lua:44: attempt to call method 'LoadDataProviders' (a nil value) 1. Initialize - addons/pointshop-master/lua/sh_pointshop.lua:44 2. unknown - addons/pointshop-master/lua/autorun/pointshop.lua:34 [/code]
Have you definatley installed this correctly? All the files are in etc, if you don't already and it's not local then use an FTP client such as FileZilla.
[QUOTE=Roag15;43585388]Have you definatley installed this correctly? All the files are in etc, if you don't already and it's not local then use an FTP client such as FileZilla.[/QUOTE] Yes all the files are in correctly [editline]18th January 2014[/editline] I did another github install, still happening :/
I could install it correctly pm me for rates. ;)
[QUOTE=M4erSam;43588366]I could install it correctly pm me for rates. ;)[/QUOTE] How bout no.
It was a conflicting addon; now I have another question. Is it possible to make the "Admin Tab" be available only to a steamid?
[QUOTE=DanielHershey;43595411]It was a conflicting addon; now I have another question. Is it possible to make the "Admin Tab" be available only to a steamid?[/QUOTE] Yes, just change IsAdmin to ply.SteamID == steamidhere.
[QUOTE=code_gs;43596143]Yes, just change IsAdmin to ply.SteamID == steamidhere.[/QUOTE] dont mean to ask a stupid question, but where exactly would i modify that? [editline]19th January 2014[/editline] I have another question, I added a custom weapon,when you buy it once, it works fine, but you cant buy it again.
bump
[QUOTE=DanielHershey;43596420]dont mean to ask a stupid question, but where exactly would i modify that? [editline]19th January 2014[/editline] I have another question, I added a custom weapon,when you buy it once, it works fine, but you cant buy it again.[/QUOTE] Line 125, DPointShopMenu.lua [code]if (PS.Config.AdminCanAccessAdminTab and LocalPlayer():IsAdmin()) or (PS.Config.SuperAdminCanAccessAdminTab and LocalPlayer():IsSuperAdmin()) then -- admin tab local AdminTab = vgui.Create('DPanel') local ClientsList = vgui.Create('DListView', AdminTab) ClientsList:DockMargin(10, 10, 10, 10) ClientsList:Dock(FILL) ClientsList:SetMultiSelect(false) ClientsList:AddColumn('Name') ClientsList:AddColumn('Points'):SetFixedWidth(60) ClientsList:AddColumn('Items'):SetFixedWidth(60) ClientsList.OnClickLine = function(parent, line, selected) local ply = line.Player local menu = DermaMenu() menu:AddOption('Set '..PS.Config.PointsName..'...', function() Derma_StringRequest( "Set "..PS.Config.PointsName.." for " .. ply:GetName(), "Set "..PS.Config.PointsName.." to...", "", function(str) if not str or not tonumber(str) then return end net.Start('PS_SetPoints') net.WriteEntity(ply) net.WriteInt(tonumber(str), 32) net.SendToServer() end ) end)[/code]
[code] [ERROR] addons/pointshop/lua/vgui/dpointshopmenu.lua:400: function arguments exp ected near '.' 1. unknown - addons/pointshop/lua/vgui/dpointshopmenu.lua:0[/code] [code] if (PS.Config.AdminCanAccessAdminTab and LocalPlayer():ply.SteamID == STEAM_0:1:MYID()) or (PS.Config.SuperAdminCanAccessAdminTab and LocalPlayer():IsSuperAdmin()) then [/code]
*cringe* [code]if (ply:SteamID() == "STEAM_0:1:numbershere") then[/code] STEAM_0:1:MYID() isn't a valid SteamID.
I Know, I put my actual ID there, i just didnt put it in this post. [editline]19th January 2014[/editline] that gave me this: [code] [ERROR] addons/pointshop/lua/vgui/dpointshopmenu.lua:400: attempt to index global 'ply' (a nil value) 1. SetShopTab - addons/pointshop/lua/vgui/dpointshopmenu.lua:400 2. DoClick - addons/pointshop/lua/vgui/dpointshopmenu.lua:483 3. unknown - lua/vgui/dlabel.lua:206 [/code]
Try replacing ply with Player.
[code] [ERROR] addons/pointshop/lua/vgui/dpointshopmenu.lua:400: attempt to call method 'SteamID' (a nil value) 1. SetShopTab - addons/pointshop/lua/vgui/dpointshopmenu.lua:400 2. DoClick - addons/pointshop/lua/vgui/dpointshopmenu.lua:483 3. unknown - lua/vgui/dlabel.lua:206 [/code] [editline]19th January 2014[/editline] Thanks for your help so far
Post the line.
[code] if (player:SteamID() == "STEAM_0:1:4124585") then [/code] [editline]19th January 2014[/editline] bump
bump
bump
[QUOTE=DanielHershey;43596420] [editline]19th January 2014[/editline] I have another question, I added a custom weapon,when you buy it once, it works fine, but you cant buy it again.[/QUOTE] [CODE]ITEM.SingleUse = false[/CODE] Put this in the start of your custom weapon.
[QUOTE=The Beta;43663749][CODE]ITEM.SingleUse = false[/CODE] Put this in the start of your custom weapon.[/QUOTE] Thanks, it worked, but do you know how to restrict the admin tab to a steamid?
[QUOTE=DanielHershey;43665862]Thanks, it worked, but do you know how to restrict the admin tab to a steamid?[/QUOTE] -snip- can't read
It should be: [code]if (PS.Config.AdminCanAccessAdminTab) or (PS.Config.SuperAdminCanAccessAdminTab and LocalPlayer():IsSuperAdmin()) or (LocalPlayer():SteamID() == "STEAM_0:1:MYID") then[/code] and if you want it to be multiple steam ID's then: [code]if (PS.Config.AdminCanAccessAdminTab) or (PS.Config.SuperAdminCanAccessAdminTab and LocalPlayer():IsSuperAdmin()) or (LocalPlayer():SteamID() == "STEAM_0:1:MYID" or LocalPlayer():SteamID() == "STEAM_0:1:SOMEID" or LocalPlayer():SteamID() == "STEAM_0:1:SOMEID") then[/code]
It worked, Thanks so much!
You're welcome. You should mark this thread as solved.
Sorry, you need to Log In to post a reply to this thread.