Stupid "error"/warning problem ... >_< - 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: Stupid "error"/warning problem ... >_< (
/showthread.php?tid=213603)
Stupid "error"/warning problem ... >_< -
Michael@Belgium - 19.01.2011
The error: (warning)
pawn Код:
C:\Users\Michael\Desktop\GTA\Eigen server\gamemodes\ShipDM.pwn(340) : warning 217: loose indentation
C:\Users\Michael\Desktop\GTA\Eigen server\gamemodes\ShipDM.pwn(353) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Warnings.
So line 338 to 361:
pawn Код:
new cmd[128],idx,tmp[256];
cmd = strtok(cmdtext, idx);
if(IsPlayerAdmin(playerid)) //line 340
{
if(!strcmp(cmd, "/akill", true, 6))
{
new id;
tmp = strtok(cmdtext, idx);
id = strval(tmp);
if(strlen(tmp) == 0) return false;
else SetPlayerHealth(id, 0);
SendClientMessageToAll(COLOR_RED, "Someone is been killed by the admin !");
}
}
if (IsPlayerAdmin(playerid)) //line 353
{
if(strcmp("/money", cmdtext, true) == 0)
{
GivePlayerMoney(playerid, 10000);
return 1;
}
}
SOLVED
Re: Stupid "error"/warning problem ... >_< -
Alby Fire - 19.01.2011
pawn Код:
new cmd[128],idx,tmp[256];
cmd = strtok(cmdtext, idx);
if(!strcmp(cmd, "/akill", true, 6))
{
if(IsPlayerAdmin(playerid))
{
new id;
tmp = strtok(cmdtext, idx);
id = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED,"Use: /akill ID");
SetPlayerHealth(id, 0);
SendClientMessageToAll(COLOR_RED, "Someone is been killed by the admin !");
}
return 1;
}
if(!strcmp(cmd, "/money", true, 6))
{
if(IsPlayerAdmin(playerid))
{
GivePlayerMoney(playerid, 10000);
}
return 1;
}
Re: Stupid "error"/warning problem ... >_< -
TouR - 19.01.2011
You can also add
at the top of your script but its no recomended
Re: Stupid "error"/warning problem ... >_< -
Alby Fire - 19.01.2011
Quote:
Originally Posted by tour15
You can also add at the top of your script but its no recomended
|
Better if he follow the identation as i wrote below in the command.
Re: Stupid "error"/warning problem ... >_< -
Michael@Belgium - 19.01.2011
Quote:
Originally Posted by tour15
You can also add at the top of your script but its no recomended
|
Quote:
Originally Posted by Alby Fire
pawn Код:
new cmd[128],idx,tmp[256]; cmd = strtok(cmdtext, idx); if(!strcmp(cmd, "/akill", true, 6)) { if(IsPlayerAdmin(playerid)) { new id; tmp = strtok(cmdtext, idx); id = strval(tmp); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED,"Use: /akill ID"); SetPlayerHealth(id, 0); SendClientMessageToAll(COLOR_RED, "Someone is been killed by the admin !"); } return 1; } if(!strcmp(cmd, "/money", true, 6)) { if(IsPlayerAdmin(playerid)) { GivePlayerMoney(playerid, 10000); } return 1; }
|
Thanks guys ! It's solved ! (a) ^^
Re: Stupid "error"/warning problem ... >_< -
TouR - 20.01.2011
Quote:
Originally Posted by Alby Fire
Better if he follow the identation as i wrote below in the command.
|
Sure thats why i wrote "Its not recomended"