SA-MP Forums Archive
Paycheck problem - 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: Paycheck problem (/showthread.php?tid=420993)



Paycheck problem - Squirrel - 07.03.2013

I got an error with the paychecks...
Код:
forward GivePlayerCheck(playerid);
public GivePlayerCheck(playerid)
{
    GivePlayerMoney(playerid,20);
    PlayerInfo[playerid][pTime]++1;
 	return 1;
}
The error is this
Код:
D:\Igre\SAMP Serveri\SAMP 0.3x server\gamemodes\RoleplayScript.pwn(1315) : error 001: expected token: ";", but found "-integer value-"
D:\Igre\SAMP Serveri\SAMP 0.3x server\gamemodes\RoleplayScript.pwn(1315) : warning 215: expression has no effect
Enum
Код:
enum pInfo
{
    pAdminLevel,
    pCash,
    pScore,
    pTime,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
My idea is to add that pTime each 10 minutes and later on save it (I dunno how to do it, using dini).

This is my paycheck timer. It works I guess. The only problem is with pTime
Код:
PayCheck[playerid]=SetTimerEx("GivePlayerCheck",600000,true,"i",playerid);



Re: Paycheck problem - zxc1 - 07.03.2013

pawn Код:
PlayerInfo[playerid][pTime]++;



Re: Paycheck problem - DiGiTaL_AnGeL - 07.03.2013

pawn Код:
enum pInfo
{
    pAdminLevel,
    pCash,
    pScore,
    pTime
}
new PlayerInfo[MAX_PLAYERS][pInfo];



Re: Paycheck problem - Squirrel - 07.03.2013

Hmmm thanks. I'll try if it works.


Edit: Works. Thanks. +rep