Error...
#1

My login code:
Код:
dcmd_login(playerid, params[])
{
	new file[256];
	new name[MAX_PLAYER_NAME];
	new string[128];
	GetPlayerName(playerid, name, sizeof(name));
	format(file, sizeof(file), "\\Users\\%s.ini", name);
	if(!dini_Exists(file)) return SendClientMessage(playerid, 0xFFFFFFFF, "Tu neesi prisiregistraves, rasyk /register [slaptazodis], kad tai padarytum!");
	if(!strlen(params)) return SendClientMessage(playerid, 0xFFFFFFFF, "Naudojimas:/register [slaptazodis]");
	if(logged[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "Tu jau esi prisijunges!");
	new tmp;
	tmp = dini_Int(file, "hashPW");
	if(udb_hash(params) != tmp)
	{
	    format(string, sizeof(string), "%s, tu ivedei neteisinga slaptazodi!", name);
	    SendPlayerMessage(playerid, 0xFFFFFFFF, string); //this is error line
		return 1;
	}
	else
	{
	    logged[playerid] = 1;
	    SendClientMessage(playerid, 0xFFFFFFFF, "Tu sekmingai prisijungei!");
	}
	return 0;
}
And why I get this error:
Код:
C:\Documents and Settings\Justas\Desktop\samp\gamemodes\gyvenimas.pwn(56) : error 017: undefined symbol "SendPlayerMessage"
C:\Documents and Settings\Justas\Desktop\samp\gamemodes\gyvenimas.pwn(439) : warning 203: symbol is never used: "ret_memcpy"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

Dude, just change this line:

Код:
SendPlayerMessage(playerid, 0xFFFFFFFF, string);
Reply
#3

Quote:
Originally Posted by blackwave
Посмотреть сообщение
Dude, just change this line:

Код:
SendPlayerMessage(playerid, 0xFFFFFFFF, string);
Maybe I became blind? Thank you.
Reply
#4

And still there is one problem with my register system, so I don't know, why I get code execution wrong...So when i register myself everything is ok, my file is created in Users folder and i automatically logged in, but there is one bad think, when I exit the server and connect to it again, i can't log in with login, it writes me that password is bad, but it's correct...So what I need to do to fix it?
Reply
#5

I don't use that file system but shouldn't you be using "strcmp"? to compare the passwords? https://sampwiki.blast.hk/wiki/Strcmp
Reply
#6

Quote:
Originally Posted by iggy1
Посмотреть сообщение
I don't use that file system but shouldn't you be using "strcmp"? to compare the passwords? https://sampwiki.blast.hk/wiki/Strcmp
That's a good idea, but than what about udb_hash?Don't I compare paswords with it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)