SA-MP Forums Archive
inconsistent return types (array & non-array) | Please 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: inconsistent return types (array & non-array) | Please help ! (/showthread.php?tid=459450)



inconsistent return types (array & non-array) | Please help ! - darkdave - 22.08.2013

I get this error several times:
Код:
error 079: inconsistent return types (array & non-array)
One of the lines is:
Код:
return 1;
Код:
SendClientMessage(playerid, COLOR_GREY, "USAGE: /pay [playerid/PartOfName] [amount]");
return 1;


What should I change or add to this I no longer get error? Delete lines with return 1 ? Sorry for my bad english. Thanks !


Re: inconsistent return types (array & non-array) | Please help ! - verlaj - 23.08.2013

can you sow us the entire function ?


also return 1; is used to tell that the function has been successfully performed for the player. if you wont place it, you will get error message in game and pawno as well

for example

pawn Код:
CMD:pay(playerid,params[]);
{
   SendClientMessage(playerid, COLOR_GREY, "USAGE: /pay [playerid/PartOfName] [amount]");
   return 1;
}
possibly you didn't placed the appropriate "{" "}"


Re: inconsistent return types (array & non-array) | Please help ! - ProjectMan - 23.08.2013

That means you are returning string and integer in the same procedure. Post the whole procedure here if you still cannot fix it.