werid error and i can't fix it.
#1

trying to fix this error and i have no clue what the issue is.

both of the codes below giving me this error

: error 025: function heading differs from prototype
: error 035: argument type mismatch (argument 2)

includes.
Код:
#include <a_mysql>
#include <audio>
#include <YSI\y_timers>
#include <dini>
#include <utils>
#include <dutils>
#include <bud>
#include <pbar>
#include <morphinc>
#include <mselection>
#include <RemoveBuilding>
#include <zcmd>
#include <GetVehicleColor>
#include <fuckcleo>
#include <OPVD>
#include <streamer>
#include <sscanf2>
#include <fire2>
Код:
stock OnPlayerLogin(playerid, password[]) // <-- error shows this line
{
	new sqlQuery[300], password2 = num_hash(password);
	format(sqlQuery, sizeof(sqlQuery), "SELECT * FROM samp_users WHERE `Username`='%s' AND `Password`='%d'", GPN(playerid), password2);
	mysql_query(sqlQuery, THREAD_LOGIN, playerid);
	return 1;
}
Код:
	if(dialogid == 1245)
	{
		if(response)
		{
			strmid(Typed[playerid], inputtext, 0, strlen(inputtext), 255);
			if(!strcmp(Typed[playerid], "None", true))
			{
				ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_PASSWORD,"Try Again, Please Log-In","You didn't type a password!\nType your password below to log-in","Log-in","Quit");
			}
			else
			{
				OnPlayerLogin(playerid, inputtext); // <--- error shows this line 
			}
		}
		else
		{
			Kick(playerid);
		}
	}
Reply
#2

Formatting inputtext might help.

pawn Код:
static str_[144]; // change the size if it's not correct according to your hash
format(str_, sizeof(str_), "%s", inputtext);
OnPlayerLogin(playerid, str_);
Reply
#3

nope still same error.
Reply
#4

Quote:
Originally Posted by Yves
Посмотреть сообщение
nope still same error.
Where it is giving you "error 025: function heading differs from prototype", I'm thinking that the function already exist somewhere?
Reply
#5

error 025: function heading differs from prototype is on the stock OnPlayerLogin(playerid, password[])
Reply
#6

Change name of this stock, for example __OnPlayerLogin - maybe other functions in includes have the same function name.
Reply
#7

Quote:
Originally Posted by ball
Посмотреть сообщение
Change name of this stock, for example __OnPlayerLogin - maybe other functions in includes have the same function name.
Thanks that worked. + 2 reps.

Quote:
Originally Posted by iZN
Посмотреть сообщение
Where it is giving you "error 025: function heading differs from prototype", I'm thinking that the function already exist somewhere?
i take it you are correct.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)