Required XP
#1

Hello, I added levels and experience points today to my server but requiredxp doesn't seem to work properly.
Here is the code:

Код:
new Float:requiredxp;
	
if (PlayerData[playerid][pLevel] == 1) requiredxp = 8;
else requiredxp = PlayerData[playerid][pLevel]*6;
The result of it is that the requiredxp is 1000000000+. What's wrong with the code?
Reply
#2

Why is it a float? Just use "new requiredxp;"
Reply
#3

Quote:
Originally Posted by GoldenLion
Посмотреть сообщение
new Float:requiredxp;
This shoudn't be a float

Just
PHP код:
new requiredxp
Reply
#4

Oh, I read somewhere that it will be more accurate if it would be a float, I'll try it, thanks.
Reply
#5

XP for what? Zombie server first?
Reply
#6

Quote:
Originally Posted by MarkNelson
Посмотреть сообщение
XP for what? Zombie server first?
XP to level up, it's a roleplay server. Removing float helped.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)