Jump to content
  • 0

pomoc error u registrace


kRySpin_CzE

Dotaz

prosim vás pomožte mě, pise mi to tohle :

C:\Users\Kryštof\Desktop\pawno\reg.pwn(73) : error 017: undefined symbol "PLAYERLIST_authed"

C:\Users\Kryštof\Desktop\pawno\reg.pwn(73) : warning 215: expression has no effect

C:\Users\Kryštof\Desktop\pawno\reg.pwn(73) : error 001: expected token: ";", but found "]"

C:\Users\Kryštof\Desktop\pawno\reg.pwn(73) : error 029: invalid expression, assumed zero

C:\Users\Kryštof\Desktop\pawno\reg.pwn(73) : fatal error 107: too many error messages on one line

 

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

 

 

4 Errors.

 

a na radku 73 mam todle

PLAYERLIST_authed[playerid]=return false;

 

poradte pls jak se toho mam zbavit

Link to comment
Share on other sites

8 odpovědí na tuto otázku

Recommended Posts

  • 0

lool nad nicim sem se jeste tak nezasmal jako tady toto " kryspin " ...nemel by si udelat neco s timto ? toto ma byt registrace ? jak si mi to poslal ? :d

 

public OnPlayerCommandText(playerid, cmdtext[])
* /register password
*
*/
dcmd_register(playerid,params[]) {

// The command shouldn't work if we already are authed
if (PLAYERLIST_authed[playerid]) return SystemMsg(playerid,"Already authed.");

// The command shouldn't work if an account with this
// nick already exists
if (udb_Exists(PlayerName(playerid))) return SystemMsg(playerid,"Učet už existuje napíš /login heslo.");

// Did he forgot the password?
if (strlen(params)==0) return SystemMsg(playerid,"Musíš sa zaregistrovať /register heslo");

// We save the money to the accstate
if (udb_Create(PlayerName(playerid),params)) return SystemMsg(playerid,"Učet bol vytvorený, teraz sa prihlás /login heslo.");
return true;

}

/*
* /login password
*
*/
dcmd_login(playerid,params[]) {

// The command shouldn't work if we already are authed
if (PLAYERLIST_authed[playerid]) return SystemMsg(playerid,"Already authed.");

// The command shouldn't work if an account with this
// nick does not exists
if (!udb_Exists(PlayerName(playerid))) return SystemMsg(playerid,"Učet neexistuje, použi /register heslo");

// Did he forgot the password?
if (strlen(params)==0) return SystemMsg(playerid,"Musíš sa prihlásiť /login heslo");

if (udb_CheckLogin(PlayerName(playerid),params)) {
// Login was correct

// Following thing is the same like the missing SetPlayerCommand
GivePlayerMoney(playerid,dUserINT(PlayerName(playerid)).("money")-GetPlayerMoney(playerid));

PLAYERLIST_authed[playerid]=true;

return SystemMsg(playerid,"Si prihlásený!");
}
// Login was incorrect
return SystemMsg(playerid,"Zlé heslo!");
}



{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
	// Do something here
	return 1;
}
return 0;
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...