argument type mismatch
#1

Hello i am getting this error and i have no clue on how to solve it.

pawn Код:
(59) : error 035: argument type mismatch (argument 1)
I want to get the seconds form the c4 timer to send the client a message each second of the countdown like
pawn Код:
if(gettime(C4DELAY[playerid] == 5))
{
SendClientMessage(playerid, -1, "5 secons untill detonation!");
}
if(gettime(C4DELAY[playerid] == 4))
{
SendClientMessage(playerid, -1, "4 secons untill detonation!");
}
//ETC....
code:
pawn Код:
new C4DELAY[MAX_PLAYERS];

forward C4_DELAY(playerid);
public C4_DELAY(playerid)
{
    CreateExplosion(BombaX[playerid],BombaY[playerid],BombaZ[playerid], 2, 20.0);
    DestroyPlayerObject(playerid,bomb);
    KillTimer(C4DELAY[playerid]);
    return 1;
}

CMD:plantc4(playerid, params[])
{
    GetPlayerPos(playerid, BombaX[playerid], BombaY[playerid], BombaZ[playerid]);
    bomb = CreatePlayerObject(playerid, 1252, BombaX[playerid]-0.5,BombaY[playerid],BombaZ[playerid]-0.5,0,-1,-1,-1);
    return 1;
}

CMD:explodec4(playerid, params[])
{
    if(IsValidPlayerObject(playerid,bomb))
    {
        C4DELAY[playerid] = SetTimer("C4_DELAY", 5000, false);
        SendClientMessage(playerid, -1, "5 Seconds untill detonation!");
       
        if(gettime(C4DELAY[playerid] == 5)) //LINE 59 <----------------------
        {
            SendClientMessage(playerid, -1, "5 secons untill detonation!");
        }
    }
    else
    {
        SendClientMessage(playerid, -1, "You did not place any C4!");
    }
    return 1;
}
Reply
#2

Which or Where Line is it ?
Reply
#3

its in the explodec4 command.

pawn Код:
if(gettime(C4DELAY[playerid] == 5)) //LINE 59 <----------------------
Reply
#4

Never mind i solved it!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)