SA-MP Forums Archive
Loose indentation - 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 (/showthread.php?tid=178173)



Loose indentation - jurtes - 20.09.2010

I keep getting the loose identation warning for that I think my /exit command isn't working. I'm trying to make a /exit command to exit the big smoke crackpalice. Here's the code:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp("/me types in the password",cmdtext))
{
    if(IsPlayerInRangeOfPoint(playerid, 1.0, 573.1510,-1570.3528,16.1775))
    {
        SetPlayerInterior(playerid,2);
        SetPlayerPos(playerid,2579.7400,-1301.7866,1060.9922);
	}
    return 1;
}


//exit of the building (not working)
if(!strcmp("/exit",cmdtext))
{
    if(IsPlayerInRangeOfPoint(playerid, 1.0, 2579.7400,-1301.7866,1060.9922))
    {
        SetPlayerInterior(playerid,0);
        SetPlayerPos(playerid,573.1510,-1570.3528,16.1775);
    }
    return 1;
}

	return 0;
}



Re: Loose indentation - Scenario - 20.09.2010

It's telling you that your indentation on your commands, functions, public and/or stocks is just screwed up. You can ignore it, or fix it. I'm sure if you do not know anything about indentation warnings, you shouldn't be working with the PAWN language, but learn it first!


Re: Loose indentation - jurtes - 20.09.2010

I'm sorry but this is just a RP thing I'm working on.. it's not like I'm hosting my own server or smth. I'll be asking the host of a server to add this but I can't tell him to add it if it ain't working and you ain't helping. In the time you wasted to write your stupid sentences down you could've wrote a helpfull comment, be a nice person and help me out, but no you didn't... Fail.


Re: Loose indentation - Scenario - 20.09.2010

Quote:
Originally Posted by jurtes
Посмотреть сообщение
I'm sorry but this is just a RP thing I'm working on.. it's not like I'm hosting my own server or smth. I'll be asking the host of a server to add this but I can't tell him to add it if it ain't working and you ain't helping. In the time you wasted to write your stupid sentences down you could've wrote a helpfull comment, be a nice person and help me out, but no you didn't... Fail.
I'm not going to start a flame war, but seriously. You're the idiot!

Quote:
Originally Posted by RealCop228
It's telling you that your indentation on your commands, functions, public and/or stocks is just screwed up. You can ignore it, or fix it.
You're saying this isn't helpful? I told you what it means and what you could do. You can also use this:

pawn Код:
#define pragma tabsize 0
However it just makes you look like a newbie. I fixed your code. Give it a shot, jerk.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) // I'm a stupid noob!
{
    if(!strcmp("/me types in the password",cmdtext)) // I'm a stupid noob!
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.0, 573.1510,-1570.3528,16.1775)) // I'm a stupid noob!
        {
            SetPlayerInterior(playerid,2); // I'm a stupid noob!
            SetPlayerPos(playerid,2579.7400,-1301.7866,1060.9922); // I'm a stupid noob!
        }
        return 1;
    }
    //exit of the building (not working)
    if(!strcmp("/exit",cmdtext)) // I'm a stupid noob!
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.0, 2579.7400,-1301.7866,1060.9922)) // I'm a stupid noob!
        {
            SetPlayerInterior(playerid,0); // I'm a stupid noob!
            SetPlayerPos(playerid,573.1510,-1570.3528,16.1775); // I'm a stupid noob!
        }
        return 1;
    }
    return 1;
}