Hey Leute ich habe ein Problem, und zwar habe ich mir ein Fraktionssystem geschrieben jedoch bekomme ich diesen Error in der Mysql_log
Code
[17:26:35] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:26:35] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:26:35] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:26:35] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:26:35] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:26:35] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:26:35] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:26:35] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:26:35] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:26:35] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:30:28] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:30:28] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:30:28] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:30:28] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:30:28] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:30:28] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:30:28] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:30:28] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:30:28] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
[17:30:28] [ERROR] "mysql_tquery" - invalid connection handle (ID = 1)
Alles anzeigen
hier der Code
Code
enum fenum {
f_name[128],
Float:f_x,
Float:f_y,
Float:f_z,
Float:f_r,
f_inter,
f_color,
f_id,
f_money,
f_wteil,
f_spice
}
public OnGameModeInit()
{
SetGameModeText("First-Roleplay");
AddPlayerClass(1,199.0846,-150.0331,1.5781,359.1443,WEAPON_MP5,500,0,0,0,0);
for(new i=0; i<sizeof(buyauto); i++)
{
buyauto[i][id_x] = AddStaticVehicle(buyauto[i][model],buyauto[i][s_x],buyauto[i][s_y],buyauto[i][s_z],buyauto[i][s_r],-1,-1);
}
dbhandle = mysql_connect(db_host,db_user,db_db,db_pass);
ManualVehicleEngineAndLights();
//Fraktion
loadFraktion();
return 1;
}
public OnGameModeExit()
{
mysql_close(dbhandle);
saveFraktion();
return 1;
}
public OnFrakLoad()
{
new num_fields,num_rows;
cache_get_data(num_rows,num_fields,dbhandle);
if(!num_rows)return 1;
for(new i=0; i<num_rows; i++)
{
new string[128];
new id=getFreeFrakID();
fInfo[id][f_x] = cache_get_field_content_float(i,"x",dbhandle);
fInfo[id][f_y] = cache_get_field_content_float(i,"y",dbhandle);
fInfo[id][f_z] = cache_get_field_content_float(i,"z",dbhandle);
fInfo[id][f_r] = cache_get_field_content_float(i,"r",dbhandle);
fInfo[id][f_money] = cache_get_field_content_int(i,"GangKasse",dbhandle);
fInfo[id][f_id] = cache_get_field_content_int(i,"id",dbhandle);
fInfo[id][f_wteil] = cache_get_field_content_int(i,"Waffenlager",dbhandle);
fInfo[id][f_spice] = cache_get_field_content_int(i,"Spicelager",dbhandle);
new tmp_name[128];
cache_get_field_content(i, "name", tmp_name, dbhandle);
strmid(fInfo[id][f_name], tmp_name, 0, sizeof(tmp_name), sizeof(tmp_name));
CreatePickup(1273, 0,fInfo[id][f_x],fInfo[id][f_y],fInfo[id][f_z], -1);
format(string,128,"Name:%s\nMoney:%i$\nID:%i",fInfo[id][f_name],fInfo[id][f_money],fInfo[id][f_id]);
Create3DTextLabel(string,GRÜN,fInfo[id][f_x],fInfo[id][f_y],fInfo[id][f_z],50,0,0);
}
return 1;
}
saveFraktion()
{
for(new i=0; i<sizeof(fInfo); i++)
{
new query[200];
format(query,sizeof query,"UPDATE fraktion SET GangKasse='%i',Waffenlager='%i',Spicelager='%i' WHERE id='%i'",
fInfo[i][f_money],fInfo[i][f_wteil],fInfo[i][f_spice],fInfo[i][f_id]);
mysql_function_query(dbhandle,query,false,"","");
}
return 1;
}
Alles anzeigen
hoffe ihr könnt mir helfen ich verzweifel grade