Help me
#1

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;
}
Reply
#2

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 ?
Reply
#3

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;
}
Reply
#4

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?
Reply
#5

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


Forum Jump:


Users browsing this thread: 1 Guest(s)