Register help
#1

Код:
Hi. I need some help with errors. I am trying to add a register commands to my Script and i having problems.

Here are the Errors.

Код:
C:\Users\Patrick\Documents\SAMP\SA_MP SERVER\gamemodes\Police.pwn(794) : error 012: invalid function call, not a valid address
C:\Users\Patrick\Documents\SAMP\SA_MP SERVER\gamemodes\Police.pwn(794) : warning 215: expression has no effect
C:\Users\Patrick\Documents\SAMP\SA_MP SERVER\gamemodes\Police.pwn(794) : error 001: expected token: ";", but found ")"
C:\Users\Patrick\Documents\SAMP\SA_MP SERVER\gamemodes\Police.pwn(794) : error 029: invalid expression, assumed zero
C:\Users\Patrick\Documents\SAMP\SA_MP SERVER\gamemodes\Police.pwn(794) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
And here are the lines.
Код:
dcmd_register(playerid, params[])
{
	if(AccountInfo[playerid][Logged] == 1) return SendClientMessage(playerid, COLOR_GREEN, "You are already registered and logined in.");
	if(udb_Exists(PlayerName2(playerid))) return SendClientMessage(playerid, COLOR_GREEN, "You are already registered please use /login.");
	if(strlen(params) == 0) return SendClientMessage(playerid, COLOR_GREEN, "ACCOUNT: Correct Useage: /register [password].");
	if(strlen(parmas) <4 || strlen(parmas) >20) return SendClientMessage(playerid, COLOR_GREEN, "Password must be 4-20 characters Long.");
	if(udb_Create(PlayerName2(playerid), params))
	{
	  new file[256];
		new name[24];
	  GetPlayerName(playerid, name, sizeof name);
		format(file, sizeof file, "PoliceMM/Accounts/%s.ini", name);
	  dUserSetINT(PlayerName2(playerid)).("registered", 1);
	  dUserSetINT(PlayerName2(playerid)).("loggedin", 1);
	  dUserSetINT(PlayerName2(playerid)).("AdminLevel", 0);
	  dUserSetINT(PlayerName2(playerid)).("Kills", 0);
	  dUserSetINT(PlayerName2(playerid)).("Deaths", 0);
	  dUserSetINT(PlayerName2(playerid)).("Money", 0);
	  AccountInfo[playerid][Logged] = 1;
	  AccountInfo[playerid][Registered] = 1;
	  SendClientMessage(playerid, COLOR_GREEN, "You have registed and have been logged in.");
	  return 1;
	 }
	 return 1;
}
Reply
#2

Change
pawn Код:
if(udb_Create(PlayerName2(playerid), params));
to
pawn Код:
if(udb_Create(PlayerName2(playerid), params))
Reply
#3

Thank you for your reply but i am still getting the same errors and warning
Reply
#4

Which line is line 794?
Reply
#5

Код:
	if(udb_Exists(PlayerName2(playerid))) return SendClientMessage(playerid, COLOR_GREEN, "You are already registered please use /login.");
= 794
Reply
#6

Ok before you snap at me i forgot to fix that and those errors where there before i did that.
Код:
AccountInfo[playerid][Logged] = 1;
     AccountInfo[playerid][Registered] = 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)