11.08.2016, 14:39
Hello!
i was fixing my friend's gamemode(mysql, but while i run it..i got errors) also after 8h/7 i can't login to my acc.. it tell me to register.. and i've already acc in DB(MySQL)
anyway
Errors:
OnDialogResponse
PerPlayerTimer
Remember this gamemode isn't mine and i didn't script it.. only myfriend ask me to fix it.. also i'am learning mysql
EDIT:When i start my server..i cajn login to my acc IG But after 8/7h i can't, it tell me to register..
i was fixing my friend's gamemode(mysql, but while i run it..i got errors) also after 8h/7 i can't login to my acc.. it tell me to register.. and i've already acc in DB(MySQL)
anyway
Errors:
Код:
[00:55:59] [debug] AMX backtrace: [00:55:59] [debug] #0 000fe444 in ?? (0) from samp.amx [00:55:59] [debug] #1 0010ced0 in public PerPlayerTimer () from samp.amx [00:56:22] [debug] Run time error 4: "Array index out of bounds" [00:56:22] [debug] Accessing element at index 2000 past array upper bound 5 [00:56:22] [debug] AMX backtrace: [00:56:22] [debug] #0 001066c0 in ?? (0, 0) from samp.amx [00:56:22] [debug] #1 000e1c20 in ?? (0, 100, 1, 2, 18865808) from samp.amx [00:56:22] [debug] #2 000119d8 in public OnDialogResponse (0, 100, 1, 2, 18865808) from samp.amx
Код:
[20:33:46] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Failed to exeute query. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Failed to exeute query. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Failed to exeute query. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Failed to exeute query. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Failed to exeute query. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. MySQL server has gone away. [20:33:46] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. MySQL server has gone away.
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 108:
{
if(response)
{
if(listitem == 0) return SendLangMessage(playerid,COLOR_TITLE,"Kein Titel ausgewдhlt!","No title selected!","No ha seleccionado un titulo!"),labelid[playerid] = -1;
new tempid = listitem - 1;
if(titles[playerid][tempid] == 0)
{
SendLangMessage(playerid,COLOR_TITLE,"Du hast diesen Titel nicht freigeschaltet!","You have not unlocked this title!","No has desbloqueado este titulo!");
LabelDialog(playerid);
return 1;
}
labelid[playerid] = listitem - 1;
new string[128];
switch(Sprache[playerid])
{
case 0: format(string,sizeof(string),"Die Beschriftung ьber deinem Kopf ist nun \"%s\"!",titlesnames[labelid[playerid]]);
case 1: format(string,sizeof(string),"Now your label above your head is \"%s\"!",titlesnames[labelid[playerid]]);
case 2: format(string,sizeof(string),"Ahora el texto sobre tu cabeza es \"%s\"!",titlesnames[labelid[playerid]]);
}
SendClientMessage(playerid,COLOR_TITLE,string);
}
return 1;
}
//Weapon slots
case 300:
{
if(response)
{
new content[340]; //17 (Weaponcharacters) * 20 (Weapons)
for(new i=0;i<sizeof(WeaponSlotsIDs);i++)
{
format(content, sizeof(content), "%s%s\n", content, WeaponSlotsNames[i]);
}
new header[70];
switch(Sprache[playerid])
{
case 0: format(header,sizeof(header),"Zurzeit im Slot: %s",WeaponSlotsNames[WeaponSlots[listitem][playerid]]), ShowPlayerDialog(playerid, 301, DIALOG_STYLE_LIST, header, content, "OK", "Abbrechen");
case 1: format(header,sizeof(header),"Current Weapon in slot: %s",WeaponSlotsNames[WeaponSlots[listitem][playerid]]),ShowPlayerDialog(playerid, 301, DIALOG_STYLE_LIST, header, content, "Accept", "Cancel");
case 2: format(header,sizeof(header),"Arma actual en el espacio: %s",WeaponSlotsNames[WeaponSlots[listitem][playerid]]),ShowPlayerDialog(playerid, 301, DIALOG_STYLE_LIST, header, content, "Aceptar", "Cancelar");
}
SetPVarInt(playerid,"weaponslotid",listitem);
}
else DeletePVar(playerid,"weaponslotid");
return 1;
}
case 301:
{
if(response)
{
for(new slot; slot < sizeof(WeaponSlots); slot++) if(WeaponSlots[slot][playerid] == listitem && listitem != 0) return SendLangMessage(playerid,_COLOR_RED,"Diese Waffe ist bereits im Slot.","This weapon is already in a slot.","Este arma ya esta en una ranura."),WeaponSlotsMainMenu(playerid);
WeaponSlots[GetPVarInt(playerid,"weaponslotid")][playerid] = listitem;
DeletePVar(playerid,"weaponslotid");
WeaponSlotsMainMenu(playerid);
}
else DeletePVar(playerid,"weaponslotid"),WeaponSlotsMainMenu(playerid);
return 1;
}
//Clan War Creator
case 1050: //main menu
{
if(response)
{
switch(listitem)
{
case 0:
{
new content[250];
mysql_query("SELECT `Clan` FROM `clans`");
mysql_store_result();
if(mysql_num_rows() > 0)
{
new Tag[8];
while(mysql_fetch_row(Tag))
{
format(content,sizeof(content),"%s%s\n",content,Tag);
}
}
else
{
switch(Sprache[playerid])
{
case 0: format(content,sizeof(content),"%sEs gibt keine Clans!",content);
case 1: format(content,sizeof(content),"%sThere are no Clans!",content);
case 2: format(content,sizeof(content),"%sNo hay clanes!",content);
}
}
switch(Sprache[playerid])
{
case 0: ShowPlayerDialog(playerid, 1051, DIALOG_STYLE_LIST, "Wдhle ersten clan", content, "Akzeptieren","Abbrechen");
case 1: ShowPlayerDialog(playerid, 1051, DIALOG_STYLE_LIST, "Select first clan", content, "Accept", "Cancel");
case 2: ShowPlayerDialog(playerid, 1051, DIALOG_STYLE_LIST, "Selecciona el primer clan.", content, "Aceptar", "Cancelar");
}
mysql_free_result();
}
case 1:
{
new content[250];
mysql_query("SELECT `Clan` FROM `clans`");
mysql_store_result();
if(mysql_num_rows() > 0)
{
new Tag[8];
while(mysql_fetch_row(Tag))
{
format(content,sizeof(content),"%s%s\n",content,Tag);
}
}
else
{
switch(Sprache[playerid])
{
case 0: format(content,sizeof(content),"%sEs gibt keine Clans!",content);
case 1: format(content,sizeof(content),"%sThere are no Clans!",content);
case 2: format(content,sizeof(content),"%sNo hay clanes!",content);
}
}
switch(Sprache[playerid])
{
case 0: ShowPlayerDialog(playerid, 1052, DIALOG_STYLE_LIST, "Wдhle zweiten clan", content, "Akzeptieren","Abbrechen");
case 1: ShowPlayerDialog(playerid, 1052, DIALOG_STYLE_LIST, "Select second clan", content, "Accept", "Cancel");
case 2: ShowPlayerDialog(playerid, 1052, DIALOG_STYLE_LIST, "Selecciona el segundo clan.", content, "Aceptar", "Cancelar");
}
mysql_free_result();
}
case 2:
{
switch(Sprache[playerid])
{
case 0: ShowPlayerDialog(playerid, 1053, DIALOG_STYLE_INPUT, "Gebe die Leben ein:", "Gebe einen Betrag zwischen 1 und 250 ein.", "Akzeptieren","Abbrechen");
case 1: ShowPlayerDialog(playerid, 1053, DIALOG_STYLE_INPUT, "Input Health:", "Enter a value between 1 and 250.", "Accept", "Cancel");
case 2: ShowPlayerDialog(playerid, 1053, DIALOG_STYLE_INPUT, "Introduce la salud:", "Selecciona un valor entre 1 y 250.", "Aceptar", "Cancelar");
}
}
case 3:
{
switch(Sprache[playerid])
{
case 0: ShowPlayerDialog(playerid, 1054, DIALOG_STYLE_INPUT, "Gebe die Rьstung ein:", "Gebe einen Betrag zwischen 1 und 250 ein.", "Akzeptieren","Abbrechen");
case 1: ShowPlayerDialog(playerid, 1054, DIALOG_STYLE_INPUT, "Input Armour:", "Enter a value between 1 and 250.", "Accept", "Cancel");
case 2: ShowPlayerDialog(playerid, 1054, DIALOG_STYLE_INPUT, "Introduce blindaje:", "Selecciona un valor entre 1 y 250.", "Aceptar", "Cancelar");
}
}
case 4:
{
new content[1024];
for(new i=0;i<38;i++)
{
format(content, sizeof(content), "%s%s\n", content, cWarWeaponNames[i]);
}
switch(Sprache[playerid])
{
case 0: ShowPlayerDialog(playerid, 1055, DIALOG_STYLE_LIST, "Wдhle 1. Waffe:", content, "Akzeptieren","Abbrechen");
case 1: ShowPlayerDialog(playerid, 1055, DIALOG_STYLE_LIST, "Select the 1. Weapon:", content, "Accept", "Cancel");
case 2: ShowPlayerDialog(playerid, 1055, DIALOG_STYLE_LIST, "Selecciona la primera arma:", content, "Aceptar", "Cancelar");
}
}
case 5:
{
switch(Sprache[playerid])
{
case 0: ShowPlayerDialog(playerid, 1057, DIALOG_STYLE_MSGBOX, "Wдhle 2. Waffe?", " ", "Ja", "Nein");
case 1: ShowPlayerDialog(playerid, 1057, DIALOG_STYLE_MSGBOX, "Give 2. Weapon?", " ", "Yes", "No");
case 2: ShowPlayerDialog(playerid, 1057, DIALOG_STYLE_MSGBOX, "Dar 2a arma?", " ", "Si", "No");
}
}
case 6:
{
switch(Sprache[playerid])
{
case 0: ShowPlayerDialog(playerid, 1060, DIALOG_STYLE_MSGBOX, "Wдhle 3. Waffe?", " ", "Ja", "Nein");
case 1: ShowPlayerDialog(playerid, 1060, DIALOG_STYLE_MSGBOX, "Give 3. Weapon?", " ", "Yes", "No");
case 2: ShowPlayerDialog(playerid, 1060, DIALOG_STYLE_MSGBOX, "Dar 3er arma?", " ", "Si", "No");
}
}
case 7:
{
switch(Sprache[playerid])
{
case 0: ShowPlayerDialog(playerid, 1063, DIALOG_STYLE_LIST, "Wдhle den Standort:", "Baseball Field\nWarehouse\nRC Battlefield\nDriving School", "Akzeptieren","Abbrechen");
case 1: ShowPlayerDialog(playerid, 1063, DIALOG_STYLE_LIST, "Select a Location:", "Baseball Field\nWarehouse\nRC Battlefield\nDriving School", "Accept", "Cancel");
case 2: ShowPlayerDialog(playerid, 1063, DIALOG_STYLE_LIST, "Selecciona un lugar:", "Baseball Field\nWarehouse\nRC Battlefield\nDriving School", "Aceptar", "Cancelar");
}
}
case 8:
{
switch(Sprache[playerid])
{
case 0: ShowPlayerDialog(playerid, 1064, DIALOG_STYLE_INPUT, "Gebe den Sieges Betrag ein:", "Gebe einen Betrag zwischen 1 and 150 ein", "Akzeptieren", "Abbrechen");
case 1: ShowPlayerDialog(playerid, 1064, DIALOG_STYLE_INPUT, "Input Win Score:", "Enter a value between 1 and 150.", "Accept", "Cancel");
case 2: ShowPlayerDialog(playerid, 1064, DIALOG_STYLE_INPUT, "Selecciona la puntuaciуn del ganador", "Introduce un valor entre 1 y 150.", "Aceptar", "Cancelar");
}
}
case 9:
{
if(!strcmp(cWar1clan, " ", false)) return ClanWarCreatorMainMenu(playerid),SendLangMessage(playerid,_COLOR_RED,"Clan 1. Name fehlt.","Clan 1. Name is missing.","Clan 1. Falta el nombre.");
if(!strcmp(cWar2clan, " ", false)) return ClanWarCreatorMainMenu(playerid),SendLangMessage(playerid,_COLOR_RED,"Clan 2. Name fehlt.","Clan 2. Name is missing.","Clan 2. Falta el nombre.");
if(!strcmp(cWar1clan, cWar2clan, false)) return ClanWarCreatorMainMenu(playerid),SendLangMessage(playerid,_COLOR_RED,"Die Clan Namen sind gleich.","The clan names are the same.","Los nombres de los clanes son los mismos.");
if(clanWarOptions[2] == 0) return ClanWarCreatorMainMenu(playerid),SendLangMessage(playerid,_COLOR_RED,"Health muss eingestellt sein.","Health must be set up.","Se debe indicar la salud.");
if(clanWarOptions[4] == 0) return ClanWarCreatorMainMenu(playerid),SendLangMessage(playerid,_COLOR_RED,"Es muss mindestens eine Waffe eingestellt sein.","Choose at least one weapon.","Elige al menos un arma.");
if(clanWarOptions[8] == 0) return ClanWarCreatorMainMenu(playerid),SendLangMessage(playerid,_COLOR_RED,"Es muss eine Gewinnscore eingestellt sein.","Choose a winning score.","Elige la puntuaciуn del ganador.");
new str[128], str2[128], str3[128];
format(str,sizeof(str),"Ein ClanWar startet: %s vs. %s, um beizutreten oder zum zuschauen tippe /cjoin",cWar1clan,cWar2clan);
format(str2,sizeof(str2),"A ClanWar starts: %s vs. %s, to join or to watching type /cjoin",cWar1clan,cWar2clan);
format(str3,sizeof(str3),"Ha empezado una guerra de clanes: %s vs. %s, para unirte o ser espectador, escribe /cjoin",cWar1clan,cWar2clan);
SendLangMessageToAll(_COLOR_YELLOW,str,str2,str3);
clanWarSet = 1;
}
}
}
return 1;
}
PHP код:
task PerPlayerTimer[1000]()
{
foreach(Player,i)
{
Anzeige2(i);
LevelUpdate(i);
Onlinegettime(i);
AntiCheat(i);
//Dschihad Armour check
if(UniqueClass[i] == 3)
{
new Float:Armour;
GetPlayerArmour(i,Armour);
if(GetPVarInt(i, "InClanWar") == 0 && duelJoined[i] == 0 && GetPVarInt(i,"join") != 2)
{
if(Armour > 1)
{
SetPlayerArmour(i,0);
}
}
}
//if(IsPlayerInAnyVehicle(i)) ClassVehicleCheck(i);
//Goggles Take
if(GetPlayerWeapon(i) == 44 || GetPlayerWeapon(i) == 45)
{
SetPlayerHealth(i,0);
}
new Float:x,Float:y,Float:z;
GetPlayerPos(i,x,y,z);
SetPVarFloat(i, "x", x);
SetPVarFloat(i, "y", y);
SetPVarFloat(i, "z", z);
SpecPosInCw(i);
if(Mute[i] == gettime() && Mute[i] != 99999) TempUnmute(i);
BuggedCheck(i);
}
}
EDIT:When i start my server..i cajn login to my acc IG But after 8/7h i can't, it tell me to register..