4 Errors Please help fast
#8

Quote:
Originally Posted by Benzke
Посмотреть сообщение
Okay.. compile it and show me the new codes.. also line 225.
Код:
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
227
Код:
gPlayerAccount[playerid] = 1;
213
Код:
if ((strcmp(PlayerInfo[playerid][pPassword], string, true, strlen(valtmp)-1) == 0))
211
Код:
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;
}
Reply


Messages In This Thread
4 Errors Please help fast - by imnoob - 12.09.2012, 12:42
Re: 4 Errors Please help fast - by MarkoN - 12.09.2012, 12:47
Re: 4 Errors Please help fast - by imnoob - 12.09.2012, 12:50
Re: 4 Errors Please help fast - by Benzke - 12.09.2012, 12:55
Re: 4 Errors Please help fast - by Vince - 12.09.2012, 12:56
Re: 4 Errors Please help fast - by imnoob - 12.09.2012, 13:01
Re: 4 Errors Please help fast - by Benzke - 12.09.2012, 13:03
Re: 4 Errors Please help fast - by imnoob - 12.09.2012, 13:06
Re: 4 Errors Please help fast - by MarkoN - 12.09.2012, 13:28
Re: 4 Errors Please help fast - by Biesmen - 12.09.2012, 13:39

Forum Jump:


Users browsing this thread: 3 Guest(s)