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



Loose Indentation(Help me pelase) - adrianneow - 17.06.2011

C:\Users\Adrian\Desktop\New folder\2.pwn(152) : warning 217: loose indentation

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gotols", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,1519.8167,-1675.5597,13.5469);
SendClientMessage(playerid,COLOR_YELLOW,"You have teleported");
return 1;
}

if (strcmp("/help", cmdtext, true, 5) == 0)
{
SendClientMessage(playerid,COLOR_YELLOW,"(Info)Wel come to my Server's HELP command!");
SendClientMessage(playerid,COLOR_YELLOW,"(Info)Hop e you enjoy the tutorial!");
return 1;
}
if (strcmp("/heal", cmdtext, true, 5) == 0)
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You have been healed!");
return 1;
}
if (strcmp("/kill", cmdtext, true, 5) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You have commited suicide!");
return 1;
}
if (strcmp("/unlockcars", cmdtext, true, 10) == 0)
{
Unlockmycars(playerid);
return 1;
}
if (strcmp("/lockcars", cmdtext, true, 10) == 0)
{
Lockmycars(playerid);
return 1;
}
return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}



Anyone can also give me the link of scripting RP server tutorial??


Re: Loose Indentation(Help me pelase) - Lorenc_ - 17.06.2011

http://dracoblue.net/tidy/pawn/


Re: Loose Indentation(Help me pelase) - Seven_of_Nine - 17.06.2011

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/gotols", cmdtext, true, 10) == 0) {
        SetPlayerPos(playerid,1519.8167,-1675.5597,13.5469);
        SendClientMessage(playerid,COLOR_YELLOW,"You have teleported");
        return 1;
    }

    if (strcmp("/help", cmdtext, true, 5) == 0) {
        SendClientMessage(playerid,COLOR_YELLOW,"(Info)Wel come to my Server's HELP command!");
        SendClientMessage(playerid,COLOR_YELLOW,"(Info)Hop e you enjoy the tutorial!");
        return 1;
    }
    if (strcmp("/heal", cmdtext, true, 5) == 0) {
        SetPlayerHealth(playerid, 100);
        SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You have been healed!");
        return 1;
    }
    if (strcmp("/kill", cmdtext, true, 5) == 0) {
        SetPlayerHealth(playerid, 0);
        SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You have commited suicide!");
        return 1;
    }
    if (strcmp("/unlockcars", cmdtext, true, 10) == 0) {
        Unlockmycars(playerid);
        return 1;
    }
    if (strcmp("/lockcars", cmdtext, true, 10) == 0) {
        Lockmycars(playerid);
        return 1;
    }
    return 0;
}


public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}
Nice website btw.