Experience system bug
#1

Hi all, the experience system of my server is buggy now. In a normal status, the system should give players one point experience per hour, but my system gives player 50 points per hour. I have tried to find the proble. out, but I failed. Can someone help me?
Reply
#2

What about providing us some code?
Reply
#3

pawn Код:
new
    Experience_Timer
;

public OnGameModeInit()
{
    Experience_Timer = SetTimer( "OnExperienceUpdate", 3200000, true );
    return 1;
}

public OnGameModeExit( )
{
    KillTimer( Experience_Timer );
    return 1;
}

forward OnExperienceUpdate( );
public OnExperienceUpdate( )
{
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if( !IsPlayerConnected( i ) ) continue;
        SetPlayerScore( i, GetPlayerScore( i ) + 1 );
        // OR your variable, if you're using. For example:
        // PlayerInfo[ i ][ pExperience ] += 1;
    }
}
Reply
#4

No no no, the problem is on payday.
Reply
#5

Quote:
Originally Posted by Fenky
Посмотреть сообщение
Hi all, the experience system of my server is buggy now. In a normal status, the system should give players one point experience per hour, but my system gives player 50 points per hour. I have tried to find the proble. out, but I failed. Can someone help me?
I gave you an example of how it should be.

Quote:
Originally Posted by Fenky
Посмотреть сообщение
No no no, the problem is on payday.
Well, what is the problem exactly? You confused me. Show us the code that it is bugged so we can fix it.
Reply
#6

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
I gave you an example of how it should be.



Well, what is the problem exactly? You confused me. Show us the code that it is bugged so we can fix it.
Where are the codes that I need to show out?..
Reply
#7

Post here your bugged code so we can see what's wrong..
Reply
#8

Quote:
Originally Posted by iJumbo
Посмотреть сообщение
Post here your bugged code so we can see what's wrong..
Can you tell me where the code is possible bugged?
Reply
#9

On the timer where it sets the experience.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)