Stuck on Sending Client Info

Post Reply
SaintSin
New to forums
New to forums
Posts: 8
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Mon May 27, 2013 5:08 pm

Stuck on Sending Client Info

Post by SaintSin »

I am using Undefined's Pointshop (http://facepunch.com/showthread.php?t=1286577)

I am trying to add a automatic system to give players double points on a certain day. This code should indicate every other Wednesday for every other week.

Code: Select all

if (tonumber(os.date("%V")) % 2 == 1) and (tonumber(os.date("%u")) == 3)
%V is the week number as a string and I use modulo to get the every other week effect starting with odd numbers then I use %u to check for Wednesday (Monday is 1)

I edit the file sv_player_extension.lua found in pointshop/lua. The code is around line 72.

Originally

Code: Select all

if PS.Config.PointsOverTime then
	timer.Create('PS_PointsOverTime_' .. self:UniqueID(), PS.Config.PointsOverTimeDelay * 60, 0, function()
		self:PS_GivePoints(PS.Config.PointsOverTimeAmount)
		self:PS_Notify("You've been given ", PS.Config.PointsOverTimeAmount, " points for playing on the server!")
	end)
end
After I changed it

Code: Select all

if PS.Config.PointsOverTime then
	if (tonumber(os.date("%V")) % 2 == 1) and (tonumber(os.date("%u")) == 7) then
		timer.Create('PS_PointsOverTime_' .. self:UniqueID(), PS.Config.PointsOverTimeDelay * 60, 0, function()
			self:PS_GivePoints(PS.Config.PointsOverTimeAmount * 2)
			self:PS_Notify(" * * * * DOUBLE POINTS DAY * * * * ")
			self:PS_Notify("You've been given ", PS.Config.PointsOverTimeAmount * 2, " points for playing on the server!")
		end)
	else
		timer.Create('PS_PointsOverTime_' .. self:UniqueID(), PS.Config.PointsOverTimeDelay * 60, 0, function()
			self:PS_GivePoints(PS.Config.PointsOverTimeAmount)
			self:PS_Notify("You've been given ", PS.Config.PointsOverTimeAmount, " points for playing on the server!")
		end)
	end
end
The issue is after I changed the code and do a full restart players cannot connect to the server they are stuck at Sending Client Information. I do not see any errors.
Post Reply