SA-MP Forums Archive
/Kick Command. - 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: /Kick Command. (/showthread.php?tid=391085)



/Kick Command. - KolleMan - 09.11.2012

Hello!
I Have 1 Problem!
HERE:

CMD:kick(playerid, params[])
{
if(Info[playerid][Admin] >= 3)
{
new PID;
new reason[64];
new str[128];
new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
GetPlayerName(playerid, Adminname, sizeof(Adminname));
GetPlayerName(PID, Playername, sizeof(Playername));
if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, Valge, "[KASUTUS] : /kick [Mдngija ID] [Pхhjus]");
if(!IsPlayerConnected(PID))
return SendClientMessage(playerid, Punane, "Mдngijat pole serveris!");
format(str, sizeof(str), "[ADMIN] : %s Visati serverist vдlja. Admini %s poolt. || Pхhjus: %s ||", Playername, Adminname, reason);
SendClientMessageToAll(Orants, str);
Kick(PID);
}
else
{
SendClientMessage(playerid, Punane, "[ADMIN] : Sul pole хigusi!");
}
return 1;
}

And i get 1 warning:

HERE:

C:\Documents and Settings\X ActionSilent\Desktop\Samp Server\gamemodes\XActionSilent.pwn(157) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.


Re: /Kick Command. - ashwinsekhari - 09.11.2012

man its just a warning not an error np use it as it is


Re: /Kick Command. - park4bmx - 09.11.2012

The warning is because the tab size is different from the open closed brackets or some function has a different tab size then the one above/bellow.
you copied and pasted it so we cant tell where it is.
you either copy it how it original was or read on...

you get this because of this
pawn Код:
//some public
{
if(sometihng)
     {
           KillAll(.....);
           KickAll(.....);
}// this is the problem becosue the brackets dont match with the same TAB size.
return 1;
}//closing the public
How it needs to be
pawn Код:
//some public
{
if(sometihng)
     {
           KillAll(.....);
           KickAll(.....);
     }// this is the problem becosue the brackets dont match with the same TAB size.
return 1;
}//closing the public



Re: /Kick Command. - KolleMan - 09.11.2012

Aohh. Ok


Re: /Kick Command. - ashwinsekhari - 09.11.2012

or see this

https://sampforum.blast.hk/showthread.php?tid=340100


Re: /Kick Command. - Astralis - 09.11.2012

Quote:
Originally Posted by ashwinsekhari
Посмотреть сообщение
man its just a warning not an error np use it as it is
Warnings make that the script will not be working ingame even if it's compiling, so its better to not have them.


Re: /Kick Command. - KolleMan - 09.11.2012

LOL!


Re: /Kick Command. - KolleMan - 09.11.2012

Its works! But... I Start the server and ...
Script[gamemodes/XActionSilent.amx]: Run time error 19:"File function is not found"


Re: /Kick Command. - park4bmx - 09.11.2012

your probably missing e.g. plugins
or the compiler didn't compile the GM


Re: /Kick Command. - xMCx - 09.11.2012

to lose this warning use
pawn Код:
#pragma tabsize 0