08.10.2015, 14:11
EDIT: As it turns out, y_timers won't handle anything more than three passed variables. Not sure why this is, probably due to the the way ****** wrote SetTimerEx(). I'm using YSI 3.0, so it might of been fixed in 4.0 (don't quote me on that, though). Nevertheless, I figured it out and fixed my problem. I'll leave this here if someone else discovers this.
Yeah so not sure what the hell is wrong, never had this problem before. Have lots of timers already in the mode and haven't had a problem like this before. I've commented the contents of the whole timer out and literally just left this but it still freezes the compiler. I tried using a "task" and a "ptask" and that works, but that's not what I want for this.
They say two eyes are better than one- perhaps you see something I don't? Lemme' know!
This doesn't even work:
Yeah so not sure what the hell is wrong, never had this problem before. Have lots of timers already in the mode and haven't had a problem like this before. I've commented the contents of the whole timer out and literally just left this but it still freezes the compiler. I tried using a "task" and a "ptask" and that works, but that's not what I want for this.
They say two eyes are better than one- perhaps you see something I don't? Lemme' know!
pawn Код:
timer timerCallPhone[3000](playerid, callerPhoneID, target, targetPhoneID, step)
{
if(target == INVALID_PLAYER_ID)
{
stop playerPhones[playerid][phoneCallTimer][callerPhoneID];
resetPhoneVariables(playerid);
resetPhoneVariables(target);
return SendClientMessage(playerid, COLOR_LIGHTRED, "(( The person you are calling has disconnected. ))");
}
switch(step)
{
case 0 .. 8:
{
//playerPhones[playerid][phoneCallTimer][callerPhoneID] = defer timerCallPhone(playerid, callerPhoneID, target, targetPhoneID, (step+1));
SendNearbyMessagef(target, COLOR_ME, "* %s's phone rings.", CheckPlayerName(target));
SendClientMessage(playerid, COLOR_YELLOW, "* "#COL_WHITE"Ringing...");
}
default:
{
SetPVarInt(playerid, "USED_PHONE_ID", callerPhoneID);
SetPVarInt(playerid, "CALLED_PHONE_ID", targetPhoneID);
playerPhones[playerid][phoneStatus][phoneID] = CALL_STATUS_VOICEMAIL;
SendClientMessagef(playerid, COLOR_YELLOW, "* "#COL_WHITE"You have reached the voicemail box of "#COL_LBLUE"%s"#COL_WHITE"."), playerPhones[target][phoneCallerID][targetPhoneID]);
SendClientMessage(playerid, COLOR_YELLOW, "* "#COL_WHITE"If you would like to leave a voicemail, please speak now. If not, please hang up!");
resetPhoneVariables(target);
}
}
return 1;
}
pawn Код:
timer timerCallPhone[3000](playerid, callerPhoneID, target, targetPhoneID, step)
{
}