SA-MP Forums Archive
Just an other Simple Error || Rep+ - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Just an other Simple Error || Rep+ (/showthread.php?tid=408546)



Just an other Simple Error || Rep+ - Mr.Faqahat - 18.01.2013

PHP код:
C:\Users\Faqahat\Desktop\LSSW8.0\gamemodes\LS-SW.pwn(6366) : warning 202number of arguments does not match definition
C
:\Users\Faqahat\Desktop\LSSW8.0\gamemodes\LS-SW.pwn(6366) : error 035argument type mismatch (argument 1
And Line is

PHP код:
if(GetPlayerHealth(playerid) <= 0) return KillTimer(timer1); 



Re: Rep + || Just an other Simple Error || - Private200 - 18.01.2013

pawn Код:
new Float:health;
    GetPlayerHealth(playerid,health);
    if (health = 0) // If you don't know the cursors i remind you : < - Smaller then = - Equal to > - Bigger then
    {
        KillTimer(timer1);
    }
Try using that instead


Re: Rep + || Just an other Simple Error || - Mr.Faqahat - 18.01.2013

[QUOTE=Private200;2332485]
pawn Код:
new Float:health;
    GetPlayerHealth(playerid,health);
    if (health < 0)
    {
        KillTimer(timer1);
    }
Try using that instead
PHP код:
C:\Users\Faqahat\Desktop\LSSW8.0\gamemodes\LS-SW.pwn(6374) : error 035argument type mismatch (argument 1)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error

Line where error Occurs
PHP код:
KillTimer(timer1); 



Re: Just an other Simple Error || Rep+ - Private200 - 18.01.2013

Are you sure about the "timer1" ? Have you given a function to it ? I mean something like

pawn Код:
public OnGameModeInit()
{
    timer1 = SetTimer("", 1000, true); // 1000 miliseconds = 1 second . Do your calculations . Add this "OnGameModeInIt"
}
//Add this code at your script where you want to use it .
new Float:health;
    GetPlayerHealth(playerid,health);
    if (health < 0)
    {
        KillTimer(timer1);
    }
I mean , have you defined "timer1" or not ?


Re: Just an other Simple Error || Rep+ - Mr.Faqahat - 18.01.2013

Quote:

timer1[playerid][GZONE] = SetTimerEx("SetZone",30000,false,"i",playerid);

Yeap


Re: Just an other Simple Error || Rep+ - Private200 - 18.01.2013

pawn Код:
//Add this code at your script where you want to use it .

new timer1[playerid][GZONE] = SetTimerEx("SetZone",30000,false,"i",playerid);

new Float:health;
    GetPlayerHealth(playerid,health);
    if (health < 0)
    {
        KillTimer(timer1);
    }
Try this and tell me . I am not able to try it as my pawno is not working well