Paycheck problem
#1

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);
Reply
#2

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

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

Hmmm thanks. I'll try if it works.


Edit: Works. Thanks. +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)