SA-MP Forums Archive
Help with warning - 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: Help with warning (/showthread.php?tid=326191)



Help with warning - boyan96 - 16.03.2012

This is the warning
warning 202: number of arguments does not match definition

This is the line of warning
PHP код:
if(gPlayerLogTries[playerid] == 4) { Kick(playerid,"*You are kick "); } 



Re: Help with warning - Jonny5 - 16.03.2012

thats cause Kick function only take 1 argument
like

pawn Код:
Kick(playerid);



Re: Help with warning - Faisal_khan - 16.03.2012

It must be:
pawn Код:
if(gPlayerLogTries[playerid] == 4) { Kick(playerid); }



AW: Help with warning - Blunt P - 16.03.2012

If you want a message then you should do something like this:

PHP код:
if(gPlayerLogTries[playerid] == 4) { SendClientMessage(playeridCOLOR_RED"You have been kicked!");Kick(playerid); } 



Re: Help with warning - Ronaldo_raul™ - 16.03.2012

^

Failed.

pawn Код:
if ( gPlayerLogTries[playerid] == 4 )
{
Kick ( playerid ) ;
SendClientMessage ( playerid , -1 , "You have been Kicked." ) ;
}



Re: Help with warning - suhrab_mujeeb - 16.03.2012

Quote:
Originally Posted by Ronaldo_raul™
Посмотреть сообщение
^

Failed.

pawn Код:
if ( gPlayerLogTries[playerid] == 4 )
{
Kick ( playerid ) ;
SendClientMessage ( playerid , -1 , "You have been Kicked." ) ;
}
Failed again.

Once a player is kicked, he can't recieve messages. The message goes before the kick.


AW: Re: Help with warning - Blunt P - 16.03.2012

Quote:
Originally Posted by Ronaldo_raul™
Посмотреть сообщение
^

Failed.

pawn Код:
if ( gPlayerLogTries[playerid] == 4 )
{
Kick ( playerid ) ;
SendClientMessage ( playerid , -1 , "You have been Kicked." ) ;
}
accually you failed, first you wrote the same code execpt 1 minor thing, you kick the player first and then trying to send a message to someone who isnt on the server anymore....


Re: Help with warning - Ronaldo_raul™ - 16.03.2012

LoL! i FAILED Hard


Ok Just fix that :P


AW: Re: Help with warning - Blunt P - 16.03.2012

Quote:
Originally Posted by Ronaldo_raul™
Посмотреть сообщение
LoL! i FAILED Hard


Ok Just fix that :P
you better be sorry! :<

I think your "fail" was reffering to my "enter" :< when i wrote stuff and i wanted to press enter it just sendt my undone code


Re: AW: Re: Help with warning - Ronaldo_raul™ - 16.03.2012

Quote:
Originally Posted by Blunt P
Посмотреть сообщение
you better be sorry! :<

I think your "fail" was reffering to my "enter" :< when i wrote stuff and i wanted to press enter it just sendt my undone code
LoL! your code won't even kick the player and you missed a bracket too --_--