28.04.2009, 19:20
Im good at fixing my errors but this error is unfamiliar, i just need to know how to fix it and then i know how to do it ;P
and
2kinds of error, i know its easy to fix but i dont know how to fix it, so please help me, i dont want you to spend time fixing the whole code if you want to , just tell me how to fix it ^^ or you can fix it if you want and tell me how u did it^^
Код:
if (strcmp(cmd, "/register", true)==0) { new string[265]; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /register [password]"); return 1; } if (gPlayerAccount[playerid] == 1) { format(string, sizeof(string), "~r~THAT NAME IS ALREADY REGISTERED!"); GameTextForPlayer(playerid, string, 3000, 4); return 1; } strmid(PlayerInfo[playerid][pPassword], tmp, 0, strlen(cmdtext), 255); //LINE 4739 Encrypt(PlayerInfo[playerid][pPassword]); GetPlayerName(playerid, playername1, sizeof(playername1)); format(string, sizeof(string), "%s.cer", playername1); new File: file = fopen(string, io_read); if (file) { format(string, sizeof(string), "~r~THAT NAME IS ALREADY REGISTERED!"); GameTextForPlayer(playerid, string, 3000, 4); fclose(file); return 1; } new File:hFile; hFile = fopen(string, io_append); new var[32];// format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]);fwrite(hFile, var); format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var); format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var); PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid); format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var); fclose(hFile); SendClientMessage(playerid, COLOR_WHITE, "Succesfully Registered!"); format(string, sizeof(string), "~w~Next time you connect, type /login <password> to log in!"); GameTextForPlayer(playerid, string, 3000, 4); OnPlayerLogin(playerid,PlayerInfo[playerid][pPassword]); return 1; }
Код:
public OnPlayerUpdate(playerid) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid]) { new string3[32]; new pname3[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname3, sizeof(pname3)); format(string3, sizeof(string3), "%s.cer", pname3); new File: pFile = fopen(string3, io_write); if (pFile) { new var[32]; format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]);fwrite(pFile, var); //line 9300 fclose(pFile); new File: hFile = fopen(string3, io_append); PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid); format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var); format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var); format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var); fclose(hFile); } } } return 1; } stock ini_GetKey( line[] ) { new keyRes[128]; keyRes[0] = 0; if ( strfind( line , "=" , true ) == -1 ) return keyRes; strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) ); return keyRes; } stock ini_GetValue( line[] ) { new valRes[128]; valRes[0]=0; if ( strfind( line , "=" , true ) == -1 ) return valRes; strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) ); return valRes; } public ShowStats(playerid,targetid) { if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid)) { new cash = GetPlayerMoney(targetid); new deaths = PlayerInfo[targetid][pDeaths]; new kills = PlayerInfo[targetid][pKills]; new name[MAX_PLAYER_NAME]; GetPlayerName(targetid, name, sizeof(name)); new Float:px,Float:py,Float:pz; GetPlayerPos(targetid, px, py, pz); new coordsstring[256]; SendClientMessage(playerid, COLOR_GREEN,"_______________________________________"); format(coordsstring, sizeof(coordsstring),"*** %s ***",name); SendClientMessage(playerid, COLOR_WHITE,coordsstring); format(coordsstring, sizeof(coordsstring), "Kills:[%d] Deaths:[%d] Cash:[$%d]",kills,deaths,cash); SendClientMessage(playerid, COLOR_GRAD5,coordsstring); SendClientMessage(playerid, COLOR_GREEN,"_______________________________________"); } }
Quote:
C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(4739) : warning 213: tag mismatch C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(4740) : warning 213: tag mismatch C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(4754) : warning 213: tag mismatch C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(4755) : warning 213: tag mismatch C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(4755) : error 032: array index out of bounds (variable "PlayerInfo") C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(4756) : warning 213: tag mismatch C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(4756) : error 032: array index out of bounds (variable "PlayerInfo") C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(4757) : warning 213: tag mismatch C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(4757) : error 032: array index out of bounds (variable "PlayerInfo") C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(475 : warning 213: tag mismatch C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(475 : error 032: array index out of bounds (variable "PlayerInfo") C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(4763) : warning 213: tag mismatch C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(9300) : warning 213: tag mismatch C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(9303) : warning 213: tag mismatch C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(9303) : error 032: array index out of bounds (variable "PlayerInfo") C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(9304) : warning 213: tag mismatch C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(9304) : error 032: array index out of bounds (variable "PlayerInfo") C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(9305) : warning 213: tag mismatch C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(9305) : error 032: array index out of bounds (variable "PlayerInfo") C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(9306) : warning 213: tag mismatch C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(9306) : error 032: array index out of bounds (variable "PlayerInfo") C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(9339) : warning 213: tag mismatch C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(9339) : error 032: array index out of bounds (variable "PlayerInfo") C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(9340) : warning 213: tag mismatch C:\DOCUME~1\ANNIKA~1.DIT\MINADO~1\Pawno\pawno\IDM. pwn(9340) : error 032: array index out of bounds (variable "PlayerInfo") |