Simple script error
#1

public AjailCount(playerid)
{
if(pInfo[playerid][pJailTime] == 1)
{
new randSpawn = random(sizeof(randomSpawns_DayZSA_Part1));
SetPlayerPos_Allow(playerid,randomSpawns_DayZSA_Pa rt1[randSpawn][0],randomSpawns_DayZSA_Part1[randSpawn][1],randomSpawns_DayZSA_Part1[randSpawn][2]);
pInfo[playerid][pJailTime] = 0;
}
else if(pInfo[playerid][pJailTime] => 2)
{

SetTimerEx(AjailCount(playerid),60000,false,"u",pl ayerid);
pInfo[playerid][pJailTime] -= 1;
}
return 1;
}



: warning 213: tag mismatch
: warning 213: tag mismatch
: warning 213: tag mismatch
warning 211: possibly unintended assignment
: error 029: invalid expression, assumed zero
warning 215: expression has no effect
: error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one
Reply
#2

pawn Код:
SetTimerEx("AjailCount",60000,false,"u",playerid);
Reply
#3

Quote:
Originally Posted by Lynn
Посмотреть сообщение
pawn Код:
SetTimerEx("AjailCount",60000,false,"u",playerid);
Thank you, but it gives me error at if(pInfo[playerid][pJailTime] == 1) tag mismatch


pInfo[playerid][pJailTime] = 0; tag mismatch

else if(pInfo[playerid][pJailTime] => 2) tagmismatch, invalid expression, assumed zero, expression has no effect, expected token: ";", but found ")"
Reply
#4

else if(pInfo[playerid][pJailTime] => 2)
replace to
else if(pInfo[playerid][pJailTime] >= 2)
Reply
#5

Are you sure you defined the enum? like this

Код:
enum Info
{
	pJailTime
};

new pInfo[MAX_PLAYERS][Info];
Reply
#6

Yes, i have enum with pJailTime
Reply
#7

Show it and show also your
Код:
new pInfo[MAX_PLAYERS][Info];
Reply
#8

Код:
new pInfo[MAX_PLAYERS][playerinfo];


enum pinfo
{
	firstspawn,
	pname23[MAX_PLAYER_NAME],
	hacker,
	pPass,
    Frozen,
    pAdminDuty,
    pJailTime
};
Reply
#9

put
Код:
new pInfo[MAX_PLAYERS][playerinfo];
under the enum
and in
Код:
enum pinfo
change it to
Код:
enum playerinfo
because you have playerinfo in the pInfo
results:


Код:
enum playerinfo
{
	firstspawn,
	pname23[MAX_PLAYER_NAME],
	hacker,
	pPass,
    Frozen,
    pAdminDuty,
    pJailTime
};
new pInfo[MAX_PLAYERS][playerinfo];
Reply
#10

Код:
warning 211: possibly unintended assignment
error 029: invalid expression, assumed zero
warning 215: expression has no effect




else if(pInfo[playerid][pJailTime] => 2)

SetTimerEx(AjailCount(playerid),60000,false,"u",playerid);

error 035: argument type mismatch (argument 1)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)