Quick Help? :)
#1

Hey I dunno, if something is wrong or not, code looks fine to me but.. I am used to it. So take a look at my code and compile report and tell me what I can fix up? thanks

My Code:
Код:
public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp("/healme",cmdtext,true,10) == 0)
	{
		SetPlayerHealth(playerid,100);
		SendClientMessage(playerid, 0xFFFFFF, "You Healed Yourself!");
		return 1;
	}
		if(strcmp("/killme",cmdtext,true,10) == 0)
	{
		SetPlayerHealth(playerid,0);
		SendClientMessage(playerid, 0xFFFFFF, "You Killed Yourself!");
		return 1;
	}
	return 0;
}
Compile Report:
Код:
C:\Users\Admin\Desktop\RP.pwn(457) : warning 217: loose indentation
C:\Users\Admin\Desktop\RP.pwn(463) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
If you can tell me what to change I'll be very happy. Thanks
Reply
#2

Its because of a missing space somewhere or you have added extra space.A loose indentation means that you have left space somewhere.
1.If you want to ignore this and ignore it as it won't do any harm to your script.
2.If you want to remove it remove the extra spaces.
Reply
#3

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/healme",cmdtext,true,10) == 0) {
        SetPlayerHealth(playerid,100);
        SendClientMessage(playerid, 0xFFFFFF, "You Healed Yourself!");
        return 1;
    }
    if(strcmp("/killme",cmdtext,true,10) == 0) {
        SetPlayerHealth(playerid,0);
        SendClientMessage(playerid, 0xFFFFFF, "You Killed Yourself!");
        return 1;
    }
    return 0;
}
Reply
#4

Quote:
Originally Posted by Kitten
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/healme",cmdtext,true,10) == 0) {
        SetPlayerHealth(playerid,100);
        SendClientMessage(playerid, 0xFFFFFF, "You Healed Yourself!");
        return 1;
    }
    if(strcmp("/killme",cmdtext,true,10) == 0) {
        SetPlayerHealth(playerid,0);
        SendClientMessage(playerid, 0xFFFFFF, "You Killed Yourself!");
        return 1;
    }
    return 0;
}
Thannnnks for that bro, rep +1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)