SA-MP Forums Archive
Help me - 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: Help me (/showthread.php?tid=278907)



sloved - Mantas7776 - 24.08.2011

C:\Users\Mantas\Downloads\samp03csvr_R2-2_win32\gamemodes\testas.pwn(23 : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1 && response == 1) {
if(inputtext[0] == '1') {
SendClientMessage(playerid,0xAA3333AA,"Hydra ispawninta");
AddStaticVehicle(520,-2243,489,74,90,-1,-1);
}
else if(inputtext[0] != '1') {
SendClientMessage(playerid,0xAA3333AA,"Slaptazodis blogas!");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Koks slaptaюodis?", "Koks slaptaюodis?", "Spawn", "Atsaukti");
}
}
return 0;
}


Re: Help me - =WoR=G4M3Ov3r - 24.08.2011

pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
 {
 if(dialogid == 1 && response == 1) {
 if(inputtext[0] == '1') {
 SendClientMessage(playerid,0xAA3333AA,"Hydra ispawninta");
 AddStaticVehicle(520,-2243,489,74,90,-1,-1);
 }
 else if(inputtext[0] != '1') {
 SendClientMessage(playerid,0xAA3333AA,"Slaptazodis blogas!");
 ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Koks slaptaюodis?", "Koks slaptaюodis?", "Spawn", "Atsaukti");
 }
 }
 return 0;
 }
Which line is the warning in ?


Re: Help me - dice7 - 24.08.2011

Just code like this and you'll get no loose indentation warnings

pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1 && response == 1)
    {
        if(inputtext[0] == '1')
        {
            SendClientMessage(playerid,0xAA3333AA,"Hydra ispawninta");
            AddStaticVehicle(520,-2243,489,74,90,-1,-1);
        }
        else if(inputtext[0] != '1')
        {
            SendClientMessage(playerid,0xAA3333AA,"Slaptazodis blogas!");
            ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Koks slapta?odis?", "Koks slapta?odis?", "Spawn", "Atsaukti");
        }
    }
    return 0;
}



Re: Help me - [MNC]Azz - 24.08.2011

Does that warning even matter? I have lots of them (CBA to put a lot of spaces and etc...) and they dont interrupt the script... or do they?


Re: Help me - Wesley221 - 24.08.2011

Its just for yourself.
When you got a code that looks messed up, its more difficult to edit it.