SA-MP Forums Archive
[Help] Y_ini Error - 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] Y_ini Error (/showthread.php?tid=552446)



[Help] Y_ini Error - Arxalan - 24.12.2014

Hello , an error occur suddenly and now i am facing more and more errors its Y_ini.inc error . When i compile my gamemode it gives me the following error :
warning 202: number of arguments does not match definition


Re: [Help] Y_ini Error - Nimrod - 24.12.2014

That means you haven't put the right amount of arguments in a function. It'd really help if you showed the code.


Re: [Help] Y_ini Error - UltraScripter - 24.12.2014

show use the code :


Re: [Help] Y_ini Error - Arxalan - 24.12.2014

PHP код:
CMD:kick(playerid,params[])
{
new 
id;
if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridCOLOR_WHITE "SERVER: Unknown Command");
if(
sscanf(params"d"id))return SendClientMessage(playerid"{FF0000}AdmUsage: {15FF00}/Kick <Playerid>");
else if(!
IsPlayerConnected(id))return SendClientMessage(playerid0xFF0000FF"Invalid Player ID");
else
{
    
Kick(id);
}
return 
1;

When i enter this code an other error occur :
error 035: argument type mismatch (argument 2)


Re: [Help] Y_ini Error - UltraScripter - 24.12.2014

show the exac code where is the error!


Re: [Help] Y_ini Error - Nimrod - 24.12.2014

Your second "SendClientMessage" needs a colour as the second argument.


Re: [Help] Y_ini Error - UltraScripter - 24.12.2014

nice nimrod i didnt see that


Re: [Help] Y_ini Error - Arxalan - 24.12.2014

UltraScripter , I don't know when the Y_ini error appeared but when i enter the kick command code it gives me another error which i told you
error 035: argument type mismatch (argument 2)
and if i remove that then only warning appear
warning 202: number of arguments does not match definition

Nimrood , Please correct the code and give me i don't know how to do it .


Re: [Help] Y_ini Error - UltraScripter - 24.12.2014

pawn Код:
CMD:kick(playerid,params[])
{
new id;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_WHITE , "SERVER: Unknown Command");
if(sscanf(params, "d", id))return SendClientMessage(playerid, 0xFF0000FF, "{FF0000}AdmUsage: {15FF00}/Kick <Playerid>");
else if(!IsPlayerConnected(id))return SendClientMessage(playerid, 0xFF0000FF, "Invalid Player ID");
else
{
    Kick(id);
}

return 1;
}