Pawno Problem with prototype and argument 2
#1

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);
            }
Reply
#2

"#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.
Reply
#3

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[]" ?
Reply
#4

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;

Reply
#5

Doesn't work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)