• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Stamina PROBLEM,IT DONT UP!REP+

chele242

TFS 0.3.6pl1 USER!!
Joined
May 28, 2009
Messages
42
Reaction score
2
Location
Otland
Hello ppl.

I got problem, players say me stamina doesnt up, it down, but no up.

Code:
-- Stamina
	rateStaminaLoss = 1
	rateStaminaGain = 1000 / 3
	rateStaminaThresholdGain = 4
	staminaRatingLimitTop = 41 * 60
	staminaRatingLimitBottom = 14 * 60
	rateStaminaAboveNormal = 1.5
	rateStaminaUnderNormal = 0.5
	staminaThresholdOnlyPremium = "yes"

There is mine stamina rate, Anyone know how fix it good? I give rep+ and Thanks
 
Try changing

Lua:
rateStaminaGain = 1000 / 3

to

Lua:
rateStaminaGain = 300

Because 1000 divided by 3 equals to something like:

333.3333333333333333333333333333333333333333333333

Into all infinity.
This might confuse the server when it tries to calculate how fast the player shall gain stamina, and thus they end up regenerating no stamina at all.

Of course this is just a guess.
 
Code:
	-- Stamina
	rateStaminaLoss = 1
	rateStaminaGain = 1000 / 4
	rateStaminaThresholdGain = 4
	staminaRatingLimitTop = 41 * 60
	staminaRatingLimitBottom = 14 * 60
	rateStaminaAboveNormal = 1.0
	rateStaminaUnderNormal = 1.0
	staminaThresholdOnlyPremium = "yes"

You can also remove stamina from your OT, because it sucks

Code:
	[COLOR="Red"]rateStaminaLoss = 1[/COLOR]
to

Code:
	[COLOR="Red"]rateStaminaLoss = 0[/COLOR]
 
Try changing

Lua Code:
rateStaminaGain = 1000 / 3

to

Lua Code:
rateStaminaGain = 300

Because 1000 divided by 3 equals to something like:

333.3333333333333333333333333333333333333333333333

Into all infinity.
This might confuse the server when it tries to calculate how fast the player shall gain stamina, and thus they end up regenerating no stamina at all.

Of course this is just a guess.

Might work. But all the 'pro' calculators irl says that 10 / 3 = 3
 
Might work. But all the 'pro' calculators irl says that 10 / 3 = 3

Well, at least all calculators and programs I've worked with, has always truncated the number down to the max number of digits the variable/screen can handle.

I just figured that using a possible floating point number as value for rates-calculations, could cause unexpected issues.
 
Back
Top