C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(145) : error 017: undefined symbol "gPlayerLogged" C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(145) : warning 215: expression has no effect C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(145) : error 001: expected token: ";", but found "]" C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(145) : error 029: invalid expression, assumed zero C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(145) : fatal error 107: too many error messages on one line
if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid,white," Error: You must be logged in to use this!"); return 1; }
new gPlayerLogged[MAX_PLAYERS];
C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL _~1.PWN(117) : warning 204: symbol is assigned a value that is never used: "tmp" C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL _~1.PWN(196) : warning 235: public function lacks forward declaration (symbol "OnPlayerLogin") C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL _~1.PWN(209) : error 017: undefined symbol "pPassword" C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL _~1.PWN(211) : error 017: undefined symbol "pPassword" C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL _~1.PWN(225) : error 017: undefined symbol "gPlayerAccount" C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL _~1.PWN(225) : warning 215: expression has no effect C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL _~1.PWN(225) : error 001: expected token: ";", but found "]" C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL _~1.PWN(225) : error 029: invalid expression, assumed zero C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL _~1.PWN(225) : fatal error 107: too many error messages on one line |
forward OnPlayerLogin()
Add on Top :
pawn Код:
|
new gPlayerLogged[MAX_PLAYERS]; new pPassword[MAX_PLAYERS]; enum Info { pLevel, pExp, pCash, }; new PlayerInfo[MAX_PLAYERS][Info]; new levelexp = 1; new ScoreOld; forward String(string[]); forward ScoreUpdate(); forward PayDay(playerid); forward PlayerPlayMusic(playerid); forward StopMusic(); forward OnPlayerLogin()
C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(37) : error 001: expected token: ";", but found "public" C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(119) : warning 204: symbol is assigned a value that is never used: "tmp" C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(198) : error 025: function heading differs from prototype C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(198) : error 025: function heading differs from prototype C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(211) : error 033: array must be indexed (variable "pPassword") C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(213) : error 033: array must be indexed (variable "pPassword") C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(227) : error 017: undefined symbol "gPlayerAccount" C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(227) : warning 215: expression has no effect C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(227) : error 001: expected token: ";", but found "]" C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(227) : error 029: invalid expression, assumed zero C:\DOCUME~1\EA3B~1\Desktop\FREAKW~1\FILTER~1\LEVEL_~1.PWN(227) : fatal error 107: too many error messages on one line
gPlayerAccount[playerid] = 1;
if ((strcmp(PlayerInfo[playerid][pPassword], string, true, strlen(valtmp)-1) == 0))
fread(UserFile, valtmp);strmid(PlayerInfo[playerid][pPassword], valtmp, 0, strlen(valtmp)-1, 255);
public OnPlayerLogin(playerid,const string[]) { new pname2[MAX_PLAYER_NAME]; new pname3[MAX_PLAYER_NAME]; new string2[64]; new string3[128]; GetPlayerName(playerid, pname2, sizeof(pname2)); format(string2, sizeof(string2), "%s.cer", pname2); new File: UserFile = fopen(string2, io_read); if (UserFile) { new valtmp[128]; fread(UserFile, valtmp);strmid(PlayerInfo[playerid][pPassword], valtmp, 0, strlen(valtmp)-1, 255); if ((strcmp(PlayerInfo[playerid][pPassword], string, true, strlen(valtmp)-1) == 0)) { new key[128],val[128]; new Data[128]; while(fread(UserFile,Data,sizeof(Data))) { key = ini_GetKey(Data); if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); } if( strcmp( key , "Exp" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); } if( strcmp( key , "Cash" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); } GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]); } fclose(UserFile); gPlayerLogged[playerid] = 1; gPlayerAccount[playerid] = 1; new score = PlayerInfo[playerid][pLevel]; SetPlayerScore(playerid, score); GetPlayerName(playerid, pname3, sizeof(pname3)); format(string3, sizeof(string3), "Succesfully logged in!"); SendClientMessage(playerid, white,string3); } else { SendClientMessage(playerid, grey, "Invalid Password"); fclose(UserFile); } } return 1; }
enum Info
{
pPassword[129],
pLevel,
pExp,
pCash,
gPlayerLogged
}
Just stop copying stuff! You can't just do that and expect it to work just like that! Honestly, learn to script and create your own systems. If you insist on copying, then at least know where to look for dependencies.
|