SA-MP Forums Archive
Experience system bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Experience system bug (/showthread.php?tid=456568)



Experience system bug - Fenky - 06.08.2013

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?


Re: Experience system bug - CrazyChoco - 06.08.2013

What about providing us some code?


Re: Experience system bug - Konstantinos - 06.08.2013

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;
    }
}



Re: Experience system bug - Fenky - 06.08.2013

No no no, the problem is on payday.


Re: Experience system bug - Konstantinos - 06.08.2013

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.


Re: Experience system bug - Fenky - 07.08.2013

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?..


Re: Experience system bug - iJumbo - 07.08.2013

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


Re: Experience system bug - Fenky - 07.08.2013

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?


Re: Experience system bug - Edix - 07.08.2013

On the timer where it sets the experience.