Little 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: Little Help (
/showthread.php?tid=288090)
Little Help -
SpiderWalk - 06.10.2011
I dont know but this error is showing
Код:
C:\Documents and Settings\Korisnik\Desktop\Programi\G.R.P\gamemodes\CSadmin.pwn(1199) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
And this is Command in which is this warning showing
pawn Код:
CMD:heal(playerid, params[])
{
if(gPlayerClass[playerid] == MEDIC_CLASS)
{
new Float:health, user, Float:x, Float:y, Float:z;
if (sscanf(params, "i", user)) return SendClientMessage(playerid, COLOR_WHITE, "[USAGE]: /heal [playerid]");
GetPlayerPos(user, x, y, z); GetPlayerHealth(user, health);
if (!IsPlayerInRangeOfPoint(playerid, 5, x, y, z)) return SendClientMessage(playerid, COLOR_WHITE, "You Are Not Close Enough To The Player!");
if (health > 1) return SendClientMessage(playerid, COLOR_WHITE, "Player's Health Is Above 1, And Cannot Be Healed!");
SendClientMessage(playerid, COLOR_WHITE, "You have just been healed!");
SetPlayerHealth(playerid, health + 50);
}
else return SendClientMessage(playerid,COLOR_WHITE,"You Are Not An Medic!");
return 1;
}
Re: Little Help -
Lorenc_ - 06.10.2011
This line:
pawn Код:
GetPlayerPos(user, x, y, z); GetPlayerHealth(user, health);
?
Re: Little Help -
[Diablo] - 06.10.2011
this is not an error, but warning. the heal command should work nevertheless.
Re: Little Help -
SpiderWalk - 06.10.2011
Quote:
Originally Posted by Lorenc_
This line:
pawn Код:
GetPlayerPos(user, x, y, z); GetPlayerHealth(user, health);
?
|
to delet it

tell me i need soggestions
Re: Little Help -
SpiderWalk - 06.10.2011
FIXED!!
Re: Little Help -
Pharrel - 06.10.2011
the warning is above those lines i guess...
ps: in sscanf use "u" for playerid cuz that way you can use the player name either like "/heal pharrel"
Re: Little Help -
iPLEOMAX - 06.10.2011
The warning is from elsewhere. (At-least not the codes you posted)
EDIT: Too late.
Re: Little Help -
$India$ - 06.10.2011
use
http://dracoblue.net/tidy/pawn/
And this will get gone