Mittag Brotfischer...
Habe ein Problem und zwar, mein Server startet sich nicht mehr (Homeserver).
Es ist im Zusammenhang mit dem Dynamischen Fraktionsfahrzeugesystem von, ich glaube, [My]Kevin.
Wollte es umschreiben und wenn ich nun bei OnGameModeInit das LoadFractionCars(); reinmache, kommt nur noch das:
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3c R2, (C)2005-2011 SA-MP Team
[15:04:39] filterscripts = "" (string)
[15:04:39]
[15:04:39] Server Plugins
[15:04:39] --------------
[15:04:39] Loading plugin: sscanf
[15:04:39]
[15:04:39] ===============================
[15:04:39] sscanf plugin loaded.
[15:04:39] (c) 2009 Alex "Y_Less" Cole
[15:04:39] ===============================
[15:04:39] Loaded.
[15:04:39] Loading plugin: mysql
[15:04:39]
> MySQL plugin R5 successfully loaded.
[15:04:39] Loaded.
[15:04:39] Loaded 2 plugins.
[15:04:39]
[15:04:39] Ban list
[15:04:39] --------
[15:04:39] Loaded: samp.ban
[15:04:39]
[15:04:39]
[15:04:39] Filter Scripts
[15:04:39] ---------------
[15:04:39] Loaded 0 filter scripts.
[15:04:39] <-| [MYSQL] Verbindung zur Datenbank wurde erfolgreich hergestellt!
Und einloggen kann ich mich auch nicht...
Hier meine Publics:
forward LoadFractionCars2();
public LoadFractionCars2()
{
new string[128];
new fc;while(fc<MAX_FRACTION_CARS)
{
format(string,sizeof(string),"%d",fc);
FractionCars[fc][fVehid] = mysql_GetInt("frakcars", "ModelID", "IDtoGet", string);
FractionCars[fc][fPos][0]= mysql_GetFloat("frakcars", "PosX", "IDtoGet", string);
FractionCars[fc][fPos][1]= mysql_GetFloat("frakcars", "PosY", "IDtoGet", string);
FractionCars[fc][fPos][2]= mysql_GetFloat("frakcars", "PosZ", "IDtoGet", string);
FractionCars[fc][fCol][0]= mysql_GetInt("frakcars", "Farbe1", "IDtoGet", string);
FractionCars[fc][fCol][1]= mysql_GetInt("frakcars", "Farbe2", "IDtoGet", string);
FractionCars[fc][fFraction] = mysql_GetInt("frakcars", "Fraktion", "IDtoGet", string);
FractionCars[fc][fCarid] = CreateVehicle(FractionCars[fc][fVehid],FractionCars[fc][fPos][0],FractionCars[fc][fPos][1],FractionCars[fc][fPos][2],FractionCars[fc][fPos][3],FractionCars[fc][fCol][0],FractionCars[fc][fCol][1],-255);
}
fc++;
return printf(" '%d' Fraktionsfahrzeug(e) wurden geladen & erstellt.",fc);
}
forward SaveFractionCars2();
public SaveFractionCars2()
{
new string[128];
new fc;while(fc<MAX_FRACTION_CARS)
{
if(FractionCars[fc][fVehid] >= 400 && FractionCars[fc][fVehid] <= 611)
{
format(string,sizeof(string),"%d",fc);
mysql_SetString("frakcars", "ModelID",FractionCars[fc][fVehid], "IDtoGet", string);
mysql_SetFloat("frakcars", "PosX",FractionCars[fc][fPos][0], "IDtoGet", string);
mysql_SetFloat("frakcars", "PosY",FractionCars[fc][fPos][1], "IDtoGet", string);
mysql_SetFloat("frakcars", "PosZ",FractionCars[fc][fPos][2], "IDtoGet", string);
mysql_SetString("frakcars", "Farbe1",FractionCars[fc][fCol][0], "IDtoGet", string);
mysql_SetString("frakcars", "Farbe2",FractionCars[fc][fCol][1], "IDtoGet", string);
mysql_SetString("frakcars", "Fraktion",FractionCars[fc][fFraction], "IDtoGet", string);
}
}fc++;
}
Was kann denn daran falsch sein?
Wenn es jemand hinbekommen hat oder so, kann er mir ja vielleicht das Ding einfach umschreiben.
Die Originalen Publics:
public LoadFractionCars(){
if(!fexist(Fraction_Car_File)){
new File:tfFile=fopen(Fraction_Car_File,io_write);
fclose(tfFile);
}
new File:fFile=fopen(Fraction_Car_File,io_read),Content[512],fc;
while(fread(fFile,Content)){
StripNewLine(Content);
sscanf(Content,"dffffddd",FractionCars[fc][fVehid],FractionCars[fc][fPos][0],FractionCars[fc][fPos][1],FractionCars[fc][fPos][2],FractionCars[fc][fPos][3],FractionCars[fc][fCol][0],FractionCars[fc][fCol][1],FractionCars[fc][fFraction]);
if(FractionCars[fc][fVehid] >= 400 && FractionCars[fc][fVehid] <= 611)
{
FractionCars[fc][fCarid] = CreateVehicle(FractionCars[fc][fVehid],FractionCars[fc][fPos][0],FractionCars[fc][fPos][1],FractionCars[fc][fPos][2],FractionCars[fc][fPos][3],FractionCars[fc][fCol][0],FractionCars[fc][fCol][1],-255);
//FractionCars[fc][fLock] = true;
fc++;
}
}
fclose(fFile);
return printf(" '%d' Fraktionsfahrzeug(e) wurden geladen & erstellt.",fc);
}
public SaveFractionCars(){
if(fexist(Fraction_Car_File)) fremove(Fraction_Car_File);
new File:fFile=fopen(Fraction_Car_File,io_append),Content[512];
new fc;while(fc<MAX_FRACTION_CARS){
if(FractionCars[fc][fVehid] >= 400 && FractionCars[fc][fVehid] <= 611){
format(Content,sizeof(Content),"%d %.3f %.3f %.3f %.3f %03d %03d %02d\r\n",FractionCars[fc][fVehid],FractionCars[fc][fPos][0],FractionCars[fc][fPos][1],FractionCars[fc][fPos][2],FractionCars[fc][fPos][3],FractionCars[fc][fCol][0],FractionCars[fc][fCol][1],FractionCars[fc][fFraction]);
fwrite(fFile,Content);
}fc++;
}return fclose(fFile);
}
//EDIT: Titel geändert