SA-MP Forums Archive
Pawno Problem with prototype and argument 2 - 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: Pawno Problem with prototype and argument 2 (/showthread.php?tid=448894)



Pawno Problem with prototype and argument 2 - Yordan_Kronos - 06.07.2013

I Saw this errors when i add This : to instal YSI
pawn Код:
#define MODE_NAME "BG RC RP 1"
#include <YSI\y_svar>
static gTeam[MAX_PLAYERS];
#pragma tabsize 0
But now i have a this Errors :

pawn Код:
error 025: function heading differs from prototype
pawn Код:
error 035: argument type mismatch (argument 2)
pawn Код:
error 025: function heading differs from prototype
pawn Код:
error 035: argument type mismatch (argument 2)
pawn Код:
forward OnPlayerLogin(playerid,password[]);
pawn Код:
OnPlayerLogin(playerid,tmppass);
pawn Код:
public OnPlayerLogin(playerid,password[])
{
pawn Код:
OnPlayerLogin(playerid,tmppass);
            }



Re: Pawno Problem with prototype and argument 2 - Income - 06.07.2013

"#pragma tabsize 0" is for lazzy scripters, you should remove that and tab all the script to get a better view instead of ignoring them which an error might occur and the compiler will simply ignore.

"error 025: function heading differs from prototype" sometimes occurs when you forward s public function incorrectly, incase the function is a public one.


Re: Pawno Problem with prototype and argument 2 - Yordan_Kronos - 06.07.2013

i remove pragma .. and yea i see only more warnings which i must fixed after this. Thanks for information for "error 025" i think that i must edit "tmppass" with "tmppass[]" ?


Re: Pawno Problem with prototype and argument 2 - Income - 06.07.2013

Quote:
Originally Posted by Yordan_Kronos
Посмотреть сообщение
i remove pragma .. and yea i see only more warnings which i must fixed after this. Thanks for information for "error 025" i think that i must edit "tmppass" with "tmppass[]" ?
No, you've already defined that as: (which is practically fine since their definition is the same)
PHP код:
forward OnPlayerLogin(playeridpassword[]);
public 
OnPlayerLogin(playeridpassword[])
{
      
// stuff here
      
return 1;

A common error would be:
PHP код:
forward OnPlayerLogin(playeridpassword[]);
public 
OnPlayerLogin(playeridpass[])
{
      
// stuff here
      
return 1;




Re: Pawno Problem with prototype and argument 2 - Yordan_Kronos - 06.07.2013

Doesn't work