Timer problem, get stuck
#1

Код:
Timer:CheckPhaseParamedic()
{
    new string[256], bonus;
	foreach(Player, playerid)
	{
	    if(J_Working[playerid] == 1 && Paramedic_Phase[playerid] == 4)
	    {
	        DisablePlayerCheckpoint(playerid);
	        print("i'm here");
	        /// It won't get past this point..it just get stuck here and I don't know what is wrong with it
     		bonus = 50*(P_Character[playerid][pcIntelligence]/P_Job[playerid][pJobSkillN]);
	        format(string, sizeof(string), "Dispercerat: Caz incheiat, ai primit un bonus de $%d", bonus);
	        SendClientMessage(playerid, COLOR_WHITE, string);
	        J_Pay[playerid]+=bonus;
	        printf("i'm here:) -> salary is %d $ :)", bonus);
	        DestroyActor(Paramedic_Emergency_Actor[playerid]);
		ResolveCase(playerid, GetPVarInt(playerid, "Emergengy_case"));
		SetPVarInt(playerid, "Emergency_case", -1);
		Paramedic_Phase[playerid] = 0;
	    }
	}
	return 1;
}
I used those printf just for debug purposes.
I used a macro for Timer to be like that.
If any code needed just ask
Reply
#2

Thank you very much, solved.
I updated foreach and now it works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)