SA-MP Forums Archive
Error - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Error (/showthread.php?tid=176458)



Error - SampStunta - 13.09.2010

This is the script:

Код:
#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/start", cmdtext, true, 10) == 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i++) {
            if(IsPlayerConnected(i)) {
                PlayerPlaySound(i,1057,0.0,0.0,0.0);
                GivePlayerWeapon(i,31,350); 
                GivePlayerWeapon(i,24,350);
                GivePlayerWeapon(i,26,350); 
                GivePlayerWeapon(i,27,350); 
            }
        return 1;
    }
    return 0;
}
And this is the error message:

Код:
E:\Program Files\Rockstar Games\GTA San Andreas\pawno\event.pwn(14) : warning 217: loose indentation
E:\Program Files\Rockstar Games\GTA San Andreas\pawno\event.pwn(16) : warning 217: loose indentation
E:\Program Files\Rockstar Games\GTA San Andreas\pawno\event.pwn(18) : error 030: compound statement not closed at the end of file (started at line 4)
Pawn compiler 3.2.3664              Copyright © 1997-2006, ITB CompuPhase


1 Error.
What does that error message mean? Sorry...


Re: Error - ahmet257 - 13.09.2010

pawn Код:
#include <a_samp>
#pragma tabsize 0
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/start", cmdtext, true, 10) == 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i++) {
            if(IsPlayerConnected(i)) {
                PlayerPlaySound(i,1057,0.0,0.0,0.0);
                GivePlayerWeapon(i,31,350);
                GivePlayerWeapon(i,24,350);
                GivePlayerWeapon(i,26,350);
                GivePlayerWeapon(i,27,350);
            }
}
        return 1;
    }
    return 0;
}



Re: Error - actiwe - 13.09.2010

tabsize is not a solution. It is better to fix ur indetation and code looks better!


Re: Error - SampStunta - 13.09.2010

Thanks so much Ahmet!


Re: Error - LarzI - 13.09.2010

pawn Код:
#pragma tabsize 0
should be banned/disabled.
This does not fix your problem AT ALL, it just hides the errors so they won't bother you, but your code will still look like a mess.


Re: Error - Retardedwolf - 13.09.2010

Instead of using the tabsize use TidyPawn.


Re: Error - LarzI - 13.09.2010

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
Instead of using the tabsize use TidyPawn.
+1 <8chars>