06.10.2013, 21:14
Hello guys, I'm trying to use loop to shorten my code so it would be much more shorter and it would save some space, I'm try to loop my enumarator Robbing, check the code below for more information
My Enum
OnPlayerLeaveDynamicCP Callback
Warning/Error Code
My Enum
pawn Код:
enum robbingshop
{
RobbingTatoo
}
new Robbing[MAX_PLAYERS][robbingshop];
pawn Код:
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
for(new i = 0; i < sizeof(rCheckpoints); i++)
{
if(checkpointid == rCheckpoints[i])
{
for(new s = 0; s < sizeof(Robbing); s++)
{
if(Robbing[playerid][s] >= 1)
{
SendClientMessage(playerid, COLOR_DARKYELLOW, "[ROBBERY FAILED]"COL_WHITE": You left the checkpoint while robbing the store!");
Robbing[playerid][s] =0;
}
}
}
}
return 1;
}
pawn Код:
: warning 213: tag mismatch