Loose indentation
#1

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

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

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.
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)