Quick Help? :) - 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)
+--- Thread: Quick Help? :) (
/showthread.php?tid=317349)
Quick Help? :) -
KiiD - 11.02.2012
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
Re: Quick Help? :) -
[HK]Ryder[AN] - 11.02.2012
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.
Re: Quick Help? :) -
Kitten - 11.02.2012
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;
}
Re: Quick Help? :) -
KiiD - 11.02.2012
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