SA-MP Forums Archive
another help needed :/ - 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: another help needed :/ (/showthread.php?tid=514135)



another help needed :/ - Le3aT - 19.05.2014

Quote:

C:\Users\zero\Downloads\EDM - Extreme Deathmatch Mania\gamemodes\Untitled.pwn(246) : error 010: invalid function or declaration
C:\Users\zero\Downloads\EDM - Extreme Deathmatch Mania\gamemodes\Untitled.pwn(24 : error 010: invalid function or declaration
C:\Users\zero\Downloads\EDM - Extreme Deathmatch Mania\gamemodes\Untitled.pwn(250) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

My code

Quote:

stook KillAll()
{
for(new 1=0; 1<MAX_PLAYERS; 1++
{
if(IsPlayerConnected(1);
{
SetPlayerHealth(playerid, 0);
}
}
}




Re: another help needed :/ - AndySedeyn - 19.05.2014

It's supposed to be:
Код:
stock
Not "stook".

EDIT:
pawn Код:
stock KillAll()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            SetPlayerHealth(i, 0);
        }
    }
    return 1;
}



Re: another help needed :/ - Luis- - 19.05.2014

pawn Код:
stock KillAll()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            SetPlayerHealth(i, 0);
        }
    }
    return 1;
}



Re: another help needed :/ - GuyYahood1 - 19.05.2014

PHP код:
stock KillAll()
{
    for(new 
i=0i<MAX_PLAYERSi++)if(IsPlayerConnected(i))SetPlayerHealth(i0);
    return 
1;




Re: another help needed :/ - Luis- - 19.05.2014

Quote:
Originally Posted by Bible
Посмотреть сообщение
It's supposed to be:
Код:
stock
Not "stook".

EDIT:
pawn Код:
stock KillAll()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i);
        {
            SetPlayerHealth(i, 0);
        }
    }
    return 1;
}
That'll still give him errors.


Re: another help needed :/ - AndySedeyn - 19.05.2014

Quote:
Originally Posted by Luis-
Посмотреть сообщение
That'll still give him errors.
Forgot a bracket. Fixed it.


Re: another help needed :/ - Luis- - 19.05.2014

Still not going to work, the ";" on IsPlayerConnected should be removed.


Re: another help needed :/ - AndySedeyn - 19.05.2014

Quote:
Originally Posted by Luis-
Посмотреть сообщение
Still not going to work, the ";" on IsPlayerConnected should be removed.
Already did that way before you mentioned it.


Re: another help needed :/ - GuyYahood1 - 19.05.2014

I recommend to put it up file:
PHP код:
#define KillAll() for(new i=0; i<MAX_PLAYERS; i++)if(IsPlayerConnected(i))SetPlayerHealth(i, 0); 



Re: another help needed :/ - Luis- - 19.05.2014

Well, not really seeing as I posted the message right after I spotted it.


Quote:
Originally Posted by GuyYahood1
Посмотреть сообщение
I recommend to put it up file:
PHP код:
#define KillAll() for(new i=0; i<MAX_PLAYERS; i++)if(IsPlayerConnected(i))SetPlayerHealth(i, 0); 
No need to confuse him or change his code. He just asked for a simple fix.