Ändere in der TimestampToDate Funktion:
if(day > MonthTimes[month][IsLeapYear(year)])
zu:
if(day > MonthTimes[month-1][IsLeapYear(year)])
Der Fehler in der Funktion ist bekannt, ich habe darauf auch im englischen Forum aufmerksam gemacht.
http://forum.sa-mp.com/showpost.php?p=3807026&postcount=72
Alles anzeigen
Nun geht das aber jedesmal wenn ich was anderes fixxe kommt schon wieder der nächste Fehler in der Log obwohl das vorher noch nie probleme gemacht hat ... Erstmal die MySQL Log:
CMySQLResult::GetRowDataByName() - invalid row index ('0')
Da steht das..
Hier im Script der nächste Fehler:
stock UpdatePlayerTacho(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
new string[128],
vehicleid,
model,
Float:CarHealth,
CarHealthIni,
Float:Tank,
zone[36];
vehicleid = GetPlayerVehicleID(playerid);
model = GetVehicleModel(vehicleid);
//GetVehiclePos(vehicleid, Vehicle[vehicleid][vehPosX2], Vehicle[vehicleid][vehPosY2], Vehicle[vehicleid][vehPosZ2]);
if(IsAFahrrad(model))return 1;
Tank = Vehicle[vehicleid][vehFuel];
GetVehicleHealth(vehicleid, CarHealth);
CarHealthIni = floatround((CarHealth - 250.0) / 7.5, floatround_floor);
if(CarHealthIni < 0) CarHealthIni = 0;
format(string, sizeof(string), "~g~%s", VehicleName[GetVehicleModel(vehicleid)-400]);
PlayerTextDrawSetString(playerid, pTextSpeedo[playerid][2], string);
if(IsVehicleATruck(vehicleid) || IsVehicleAPilot(vehicleid) || IsVehicleABus(vehicleid) || IsVehicleABoat(vehicleid))
{
format(string, sizeof(string), "~g~Tank: ~w~-");
PlayerTextDrawSetString(playerid, pTextSpeedo[playerid][3], string);
}
else
{
format(string, sizeof(string), "~g~Tank: ~w~%.1f/%.0f ~g~L",Tank, VehicleData[GetVehicleModel(vehicleid)-400][vehMaxTank]);
PlayerTextDrawSetString(playerid, pTextSpeedo[playerid][3], string);
}
format(string, sizeof(string), "~g~Zustand: ~w~%d~g~%", CarHealthIni);
PlayerTextDrawSetString(playerid, pTextSpeedo[playerid][4], string); //HIER IST DER FEHLER..
format(string, sizeof(string), "%d km/h", GetVehicleSpeed(vehicleid));
PlayerTextDrawSetString(playerid, pTextSpeedo[playerid][5], string);
format(string, sizeof(string), "~g~KM-Stand:~w~ %.1f", Vehicle[vehicleid][vehKMStand]);
PlayerTextDrawSetString(playerid, pTextSpeedo[playerid][6], string);
if(Tank <= 5.0)
{
PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
}
if(GetPlayerCheckpointType(playerid) == CP_TYPE_BUS)
{
format(string, sizeof(string), "~g~%s", GetBusLinie(Spieler[playerid][pBusLinie]));
PlayerTextDrawSetString(playerid, pTextJob[playerid][2], string);
format(string, sizeof(string), "~g~Naechste Haltestelle:~w~ %s", GetNextDestination(playerid));
PlayerTextDrawSetString(playerid, pTextJob[playerid][3], string);
GetPlayer2DZone(playerid, zone, 36);
format(string, sizeof(string), "~g~GPS: ~w~%s", zone);
PlayerTextDrawSetString(playerid, pTextJob[playerid][4], string);
format(string, sizeof(string), "~g~Entfernung:~w~ %0.1f m", GetPlayerNextDistance(playerid));
PlayerTextDrawSetString(playerid, pTextJob[playerid][5], string);
}
else if(GetPlayerCheckpointType(playerid) == CP_TYPE_TRUCK)
{
new xIDx = Spieler[playerid][pTruckItem];
format(string, sizeof(string), "~g~%s", TRC[xIDx][trName]);
PlayerTextDrawSetString(playerid, pTextJob[playerid][2], string);
format(string, sizeof(string), "~g~Naechstes Ziel:~w~ %s", Spieler[playerid][pPilotDestination]);
PlayerTextDrawSetString(playerid, pTextJob[playerid][3], string);
GetPlayer2DZone(playerid, zone, 36);
format(string, sizeof(string), "~g~GPS: ~w~%s", zone);
PlayerTextDrawSetString(playerid, pTextJob[playerid][4], string);
format(string, sizeof(string), "~g~Entfernung:~w~ %0.1f m", GetPlayerDistanceFromPoint(playerid, Spieler[playerid][pCheckpointX], Spieler[playerid][pCheckpointY], Spieler[playerid][pCheckpointZ]));
PlayerTextDrawSetString(playerid, pTextJob[playerid][5], string);
}
else if(GetPlayerCheckpointType(playerid) == CP_TYPE_PILOT)
{
new xIDx = Spieler[playerid][pPilotItem];
format(string, sizeof(string), "~g~%s", PLT[xIDx][plName]);
PlayerTextDrawSetString(playerid, pTextJob[playerid][2], string);
format(string, sizeof(string), "~g~Naechstes Ziel: ~w~%s", Spieler[playerid][pPilotDestination]);
PlayerTextDrawSetString(playerid, pTextJob[playerid][3], string);
GetPlayer2DZone(playerid, zone, 36);
format(string, sizeof(string), "~g~GPS: ~w~%s", zone);
PlayerTextDrawSetString(playerid, pTextJob[playerid][4], string);
format(string, sizeof(string), "~g~Entfernung:~w~ %0.1f m", GetPlayerNextPilotD(playerid));
PlayerTextDrawSetString(playerid, pTextJob[playerid][5], string);
}
else
{
HideJobForPlayer(playerid);
}
}
return 1;
}
Fehler ist mit nem Kommentar gekennzeichnet.
Das steht auch noch in der Log:
sscanf warning: String buffer overflow.
Hoffe du hilfst nochmal bei den ganzen Fehlern.
Oder ein anderer wäre sehr dankbar.
@Jeffry