Errors bei Autohaus System

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hei ich poste mal alles was dazu gehöhrt^^
    Solltet ihr generell noch fehler sehen dann wäre es nett wenn ihr vlt. das kurz umschreiben könntet ^^


    Ich habe einige Autohaus Errors:


    Spoiler anzeigen

    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(201) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(201) : error 018: initialization data exceeds declared size
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(251) : error 010: invalid function or declaration
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(788) : warning 213: tag mismatch
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1174) : warning 213: tag mismatch
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1174) : warning 213: tag mismatch
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1174) : error 032: array index out of bounds (variable "cInfo")
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1176) : error 017: undefined symbol "createPlayerCar"
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1673) : warning 213: tag mismatch
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1673) : error 035: argument type mismatch (argument 3)
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1674) : warning 213: tag mismatch
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1674) : error 032: array index out of bounds (variable "cInfo")
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1674) : warning 213: tag mismatch
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1676) : error 028: invalid subscript (not an array or too many subscripts): "tank"
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1676) : warning 215: expression has no effect
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1676) : error 001: expected token: ";", but found "]"
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1676) : error 029: invalid expression, assumed zero
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1676) : fatal error 107: too many error messages on one line


    Ich amrkiere euch die Zeilen


    Enums:



    //Cars
    enum carEnum{
    id_x,
    model,
    besitzer,
    Float:c_x,
    Float:c_y,
    Float:c_z,
    Float:c_r,
    Color_1,
    Color_2,
    db_id,
    tank
    }


    //Autohaus spawn
    enum autohausEnum{
    Float:s_x,
    Float:s_y,
    Float:s_z,
    Float:s_r
    }


    //Autohaus Cars notiz
    enum autohauscarEnum{
    model,
    Float:c_x,
    Float:c_y,
    Float:c_z,
    Float:c_r,
    c_preis,
    ah_id,
    id_x,
    Color_1,
    Color_2,
    c_name[50],
    c_tank
    }



    Globale Variable:


    new cInfo[2000][carEnum];//Soviele autos können auf dem server exestieren




    //Alle Autohäuser
    new ahInfo[][autohausEnum] = {
    {2126.6221,1428.9525,10.9484,89.5156}, //ID:0 Autohaus:1
    {2458.3274,1358.0619,10.5258,180.1502}, //ID:1 Autohaus:2
    {696.7387,1838.5415,5.1643,78.8214}, //ID:2 Autohaus:3
    {2449.0503,1629.2646,10.5256,359.8734}, //ID:3 Autohaus:4
    {1609.9999,1636.1665,10.5261,178.8637}, //ID:4 Autohaus:5
    {1592.3638,589.8622,-0.6224,203.4192} //ID:5 Autohaus:6
    };


    //Alle Autos der Autohäuser
    new ahCars[][autohauscarEnum] = {
    {412,2103.8450,1409.5842,10.6566,0.1924,15000,0,1,1,"Voodoo",40}, //Autohaus 1, Gebauchtwagen //Fehler zeile 201
    {534,2110.3457,1408.9539,10.5460,0.2380,15000,0,1,1,"Remington",40},
    {518,2116.8232,1408.8162,10.4937,358.3378,13000,0,1,1,"Buccaneer",518},
    {536,2123.1187,1409.0094,10.5498,1.4423,12500,0,1,1,"blade",40},
    {533,2129.6584,1408.5408,10.5294,359.8628,11000,0,1,1,"Feltzer",37},
    {466,2135.9221,1408.9258,10.5622,0.8526,8000,12000,0,1,1,"Glendale",42},
    {492,2142.3069,1409.0468,10.5993,359.9930,17000,0,1,1,"Greenwood",42},
    {480,2148.8027,1408.4364,10.5927,359.4524,18500,0,1,1,"Comet",45},
    {603,2145.5586,1398.1621,10.6420,180.4652,16000,0,1,1,"Phoenix",47},
    {535,2139.1475,1398.2649,10.5756,178.6059,17500,0,1,1,"Slamvan",41},
    {562,2132.8357,1398.6896,10.4816,181.1042,15000,0,1,1,"Elegy",42},
    {558,2126.2896,1398.4696,10.4393,179.9395,14500,0,1,1,"Uranus",37},
    {507,2119.9333,1397.8513,10.6391,179.5709,6500,0,1,1"Elegant",45},
    {600,2113.4722,1398.0952,10.5329,179.9730,8500,0,1,1,"Picador",38},
    {496,2107.1082,1398.6458,10.5840,179.4070,5500,0,1,1,"Blistra Compact",38},
    {565,2100.7520,1398.6073,10.4454,179.1954,4500,0,1,1,"Flash",36},
    {481,2461.9063,1337.8259,10.3210,151.2824,1500,1,1,1,"BMX",0}, //Autohaus2, Motorrad
    {462,2458.8877,1338.1765,10.4177,150.8521,3000,1,1,1,"Faggio",20},
    {586,2455.7124,1337.8788,10.3400,146.2616,13000,1,1,1,"Wayfarer",25},
    {581,2452.1418,1337.6221,10.4153,156.3525,18000,1,1,1,"BF-400",25},
    {521,2440.2124,1339.9473,10.3957,239.9504,24000,1,1,1,"FCR-900",25},
    {461,2440.2087,1342.6840,10.4038,243.7388,28000,1,1,1,"PCJ-600",25},
    {463,2440.2087,1345.8983,10.3606,242.9644,35000,1,1,1,"Freeway",30},
    {522,2440.1445,1348.8660,10.3921,239.4331,70000,1,1,1,"NRG-500",37},
    {468,683.3861,1825.2622,4.9573,328.4282,17000,2,1,1,"Sanchez",26}, //Autohaus3, Offroad
    {500,679.3278,1825.4117,5.3770,349.6652,25000,2,1,1,"Mesa",45},
    {554,674.8481,1827.3662,5.3320,348.9143,23000,2,1,1,"Yosemite",50},
    {505,668.3312,1829.7117,5.3198,302.6436,30000,2,1,1,"Rancher",52},
    {579,668.1749,1836.6044,5.0598,263.1929,24000,2,1,1,"Huntley",47},
    {400,668.4810,1841.7926,5.2596,263.3816,16500,2,1,1,"Landstalker",42},
    {471,668.0714,1845.3855,4.6346,260.6001,8000,2,1,1,"Quad",25},
    {409,2434.8821,1651.3101,10.6213,88.7507,150000,3,1,1,"Stretch",60}, //Autohaus4, LuxusCars
    {541,2426.1550,1653.9694,10.4452,219.8360,170000,3,1,1,"Bullet",55},
    {559,2422.8804,1662.0508,10.4766,332.8268,135000,3,1,1,"Jester",52},
    {506,2425.0513,1672.2029,10.5168,332.1645,120000,3,1,1,"Super GT",55},
    {402,2430.7961,1674.0610,10.6508,330.7833,110000,3,1,1,"Buffalo",47},
    {429,2435.2512,1673.7396,10.5004,1.3049,125000,3,1,1,"Banshee",45},
    {560,2439.7590,1673.7755,10.5256,26.5780,160000,3,1,1,"Sultan",57},
    {451,2446.1355,1672.6711,10.5247,27.7232,230000,3,1,1,"Turismo",62},
    {415,2447.3645,1662.3269,10.5932,203.3294,180000,3,1,1,"Cheetah",57},
    {411,2445.2241,1653.8003,10.5467,137.6222,250000,3,1,1,"Infernus",65},
    {519,1624.9279,1526.3020,11.7122,44.5704,400000,4,1,1,"Shamal",100}, //Autohaus5, Flugzeuge
    {469,1638.3878,1536.8196,10.8022,46.2593,320000,4,1,1,"Sparrow",75},
    {487,1648.4219,1542.1687,10.9241,42.4183,380000,4,1,1,"Maverick",70},
    {593,1657.7698,1549.4210,11.2489,41.6538,200000,4,1,1,"Dodo",60},
    {452,1616.3683,593.6839,-0.2332,164.5531,140000,5,1,1,"Speeder",60}, //Autohaus6, Boote
    {446,1617.1893,577.0570,-0.5587,166.4310,190000,5,1,1,"Squallo",55},
    {454,1639.6404,590.9737,0.2862,189.4858,250000,5,1,1,"Tropic",50},
    {473,1631.4811,572.1327,0.0651,185.6611,50000,5,1,1,"Dinghy",30},
    {493,1638.4229,576.5723,-0.1675,192.7350,200000,5,1,1,"Jetmax",60}
    }; //Zeile 251



    OnPlayerDisconenct:



    public OnPlayerDisconnect(playerid, reason)
    {
    for(new i=0; i<sizeof(cInfo); i++)
    {
    if(cInfo[i][id_x]==0)continue;
    if(cInfo[i][besitzer]!=PlayerInfo[playerid][db_id])continue; //Zeile 788
    /*GetVehiclePos(cInfo[i][id_x],cInfo[i][c_x],cInfo[i][c_y],cInfo[i][c_z]);
    GetVehicleZAngle(cInfo[i][id_x],cInfo[i][c_r]);
    new query[128];
    format(query,sizeof(query),"UPDATE autos SET x='%f',y='%f',z='%f',r='%f' WHERE id='%i'",cInfo[i][c_x],cInfo[i][c_y],cInfo[i][c_z],cInfo[i][c_r],cInfo[i][db_id]);
    mysql_pquery(dbhandle,query,"","");*/
    DestroyVehicle(cInfo[i][id_x]);
    cInfo[i][id_x]=0;
    }
    savePlayer(playerid);
    getPlayerLogged(playerid) = 0;
    return 1;
    }



    Bei OnDialogResponse:



    case DIALOG_AUTOHAUS:
    {
    if(response)
    {
    //Autoverkauf notiz
    new id=GetPVarInt(playerid,"buyCarID"),query[265];
    if(getPlayerMoney(playerid)<ahCars[id][c_preis])
    {
    SendClientMessage(playerid,Rot,"Du besitzt nicht genügend Geld umd dieses Fahrzeug zu kaufen.");
    RemovePlayerFromVehicle(playerid);
    return 1;
    }
    setPlayerMoney(playerid,-ahCars[id][c_preis]);
    format(query,sizeof(query),"INSERT INTO autos (besitzer,model,x,y,z,r,name,tank) VALUES ('%s','%i','%f','%f','%f','%f','%s','%f')",cInfo[id][besitzer],cInfo[id][model],cInfo[id] [c_x],cInfo[id][c_y],cInfo[id][c_z],cInfo[id][c_r],cInfo[id][c_name],cInfo[id][c_tank]); //zeile 1174
    mysql_pquery(dbhandle,query,"carSavedToDB","i",id);
    createPlayerCar(playerid,ahCars[id][model],ahInfo[ahCars[id][ah_id]][s_x],ahInfo[ahCars[id][ah_id]][s_y],ahInfo[ahCars[id][ah_id]][s_z],ahInfo[ahCars[id][ah_id]][s_r]);
    SendClientMessage(playerid,Gruen,"Du hast das Auto erfolgreich gekauft");
    RemovePlayerFromVehicle(playerid);
    }
    else
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,COLOR_RED,"Du hast den Kauf abgebrochen");
    }
    return 1;
    }



    OnPlayerCarsLoad:



    //notiz
    forward OnPlayerCarsLoad(playerid);
    public OnPlayerCarsLoad(playerid)
    {
    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 id=getFreeCarID();
    cache_get_field_content(0,"besitzer",cInfo[id][besitzer],dbhandle,50);
    cInfo[id][model]=cache_get_field_content_int(i,"model",dbhandle);
    cInfo[id][c_x]=cache_get_field_content_float(i,"x",dbhandle);
    cInfo[id][c_y]=cache_get_field_content_float(i,"y",dbhandle);
    cInfo[id][c_z]=cache_get_field_content_float(i,"z",dbhandle);
    cInfo[id][c_r]=cache_get_field_content_float(i,"r",dbhandle);
    cInfo[id][db_id]=cache_get_field_content_int(i,"id",dbhandle);
    cInfo[id][c_name]=cache_get_field_content(i,"name",dbhandle); //zeile 1673
    cInfo[id][c_tank]=cache_get_field_content_float(i,"tank",dbhandle);
    cInfo[id][id_x]=CreateVehicle(cInfo[id][model],cInfo[id][c_x],cInfo[id][c_y],cInfo[id][c_z],cInfo[id][c_r],-1,-1,-1);
    tank[cInfo[id][id_x]]=100;
    }
    return 1;
    }


  • //Autohaus Cars notiz
    enum autohauscarEnum{
    model,
    Float:c_x,
    Float:c_y,
    Float:c_z,
    Float:c_r,
    c_preis,
    ah_id,
    Color_1,
    Color_2,
    c_name[50],
    c_tank,
    id_x //Das hier ganz am Ende, weil du ihm keinen Wert gibst.
    }


    cInfo[id][c_name]=cache_get_field_content(i,"name",dbhandle); //zeile 1673
    zu:
    cache_get_field_content(i,"name",cInfo[id][c_name],dbhandle,50); //zeile 1673


    Was bleibt dann an Errors übrig?

    3HZXdYd.png

    2 Mal editiert, zuletzt von Jeffry ()

  • Beitrag von DerHazeing ()

    Dieser Beitrag wurde gelöscht, Informationen über den Löschvorgang sind nicht verfügbar.

  • Habe jetzt folgende :


    Spoiler anzeigen
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(207) : warning 228: length of initialler exceeds size of the enum field
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(207) : error 018: initialization data exceeds declared size
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(252) : error 010: invalid function or declaration
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(789) : warning 213: tag mismatch
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1174) : warning 213: tag mismatch
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1174) : warning 213: tag mismatch
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1174) : error 032: array index out of bounds (variable "cInfo")
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1673) : warning 213: tag mismatch
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1674) : warning 213: tag mismatch
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1674) : error 032: array index out of bounds (variable "cInfo")
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1674) : warning 213: tag mismatch
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1676) : error 028: invalid subscript (not an array or too many subscripts): "tank"
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1676) : warning 215: expression has no effect
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1676) : error 001: expected token: ";", but found "]"
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1676) : error 029: invalid expression, assumed zero
    C:\Users\Spiele\Desktop\Server Projekt Neu\gamemodes\lvreallife.pwn(1676) : fatal error 107: too many error messages on one line



    //Alle Autos der Autohäuser
    new ahCars[][autohauscarEnum] = {
    {412,2103.8450,1409.5842,10.6566,0.1924,15000,0,1,1,"Voodoo",40}, //Autohaus 1, Gebauchtwagen
    {534,2110.3457,1408.9539,10.5460,0.2380,15000,0,1,1,"Remington",40},
    {518,2116.8232,1408.8162,10.4937,358.3378,13000,0,1,1,"Buccaneer",518},
    {536,2123.1187,1409.0094,10.5498,1.4423,12500,0,1,1,"blade",40},
    {533,2129.6584,1408.5408,10.5294,359.8628,11000,0,1,1,"Feltzer",37},
    {466,2135.9221,1408.9258,10.5622,0.8526,8000,12000,0,1,1,"Glendale",42}, //Zeile 207
    {492,2142.3069,1409.0468,10.5993,359.9930,17000,0,1,1,"Greenwood",42},
    {480,2148.8027,1408.4364,10.5927,359.4524,18500,0,1,1,"Comet",45},
    {603,2145.5586,1398.1621,10.6420,180.4652,16000,0,1,1,"Phoenix",47},
    {535,2139.1475,1398.2649,10.5756,178.6059,17500,0,1,1,"Slamvan",41},
    {562,2132.8357,1398.6896,10.4816,181.1042,15000,0,1,1,"Elegy",42},
    {558,2126.2896,1398.4696,10.4393,179.9395,14500,0,1,1,"Uranus",37},
    {507,2119.9333,1397.8513,10.6391,179.5709,6500,0,1,1"Elegant",45},
    {600,2113.4722,1398.0952,10.5329,179.9730,8500,0,1,1,"Picador",38},
    {496,2107.1082,1398.6458,10.5840,179.4070,5500,0,1,1,"Blistra Compact",38},
    {565,2100.7520,1398.6073,10.4454,179.1954,4500,0,1,1,"Flash",36},
    {481,2461.9063,1337.8259,10.3210,151.2824,1500,1,1,1,"BMX",0}, //Autohaus2, Motorrad
    {462,2458.8877,1338.1765,10.4177,150.8521,3000,1,1,1,"Faggio",20},
    {586,2455.7124,1337.8788,10.3400,146.2616,13000,1,1,1,"Wayfarer",25},
    {581,2452.1418,1337.6221,10.4153,156.3525,18000,1,1,1,"BF-400",25},
    {521,2440.2124,1339.9473,10.3957,239.9504,24000,1,1,1,"FCR-900",25},
    {461,2440.2087,1342.6840,10.4038,243.7388,28000,1,1,1,"PCJ-600",25},
    {463,2440.2087,1345.8983,10.3606,242.9644,35000,1,1,1,"Freeway",30},
    {522,2440.1445,1348.8660,10.3921,239.4331,70000,1,1,1,"NRG-500",37},
    {468,683.3861,1825.2622,4.9573,328.4282,17000,2,1,1,"Sanchez",26}, //Autohaus3, Offroad
    {500,679.3278,1825.4117,5.3770,349.6652,25000,2,1,1,"Mesa",45},
    {554,674.8481,1827.3662,5.3320,348.9143,23000,2,1,1,"Yosemite",50},
    {505,668.3312,1829.7117,5.3198,302.6436,30000,2,1,1,"Rancher",52},
    {579,668.1749,1836.6044,5.0598,263.1929,24000,2,1,1,"Huntley",47},
    {400,668.4810,1841.7926,5.2596,263.3816,16500,2,1,1,"Landstalker",42},
    {471,668.0714,1845.3855,4.6346,260.6001,8000,2,1,1,"Quad",25},
    {409,2434.8821,1651.3101,10.6213,88.7507,150000,3,1,1,"Stretch",60}, //Autohaus4, LuxusCars
    {541,2426.1550,1653.9694,10.4452,219.8360,170000,3,1,1,"Bullet",55},
    {559,2422.8804,1662.0508,10.4766,332.8268,135000,3,1,1,"Jester",52},
    {506,2425.0513,1672.2029,10.5168,332.1645,120000,3,1,1,"Super GT",55},
    {402,2430.7961,1674.0610,10.6508,330.7833,110000,3,1,1,"Buffalo",47},
    {429,2435.2512,1673.7396,10.5004,1.3049,125000,3,1,1,"Banshee",45},
    {560,2439.7590,1673.7755,10.5256,26.5780,160000,3,1,1,"Sultan",57},
    {451,2446.1355,1672.6711,10.5247,27.7232,230000,3,1,1,"Turismo",62},
    {415,2447.3645,1662.3269,10.5932,203.3294,180000,3,1,1,"Cheetah",57},
    {411,2445.2241,1653.8003,10.5467,137.6222,250000,3,1,1,"Infernus",65},
    {519,1624.9279,1526.3020,11.7122,44.5704,400000,4,1,1,"Shamal",100}, //Autohaus5, Flugzeuge
    {469,1638.3878,1536.8196,10.8022,46.2593,320000,4,1,1,"Sparrow",75},
    {487,1648.4219,1542.1687,10.9241,42.4183,380000,4,1,1,"Maverick",70},
    {593,1657.7698,1549.4210,11.2489,41.6538,200000,4,1,1,"Dodo",60},
    {452,1616.3683,593.6839,-0.2332,164.5531,140000,5,1,1,"Speeder",60}, //Autohaus6, Boote
    {446,1617.1893,577.0570,-0.5587,166.4310,190000,5,1,1,"Squallo",55},
    {454,1639.6404,590.9737,0.2862,189.4858,250000,5,1,1,"Tropic",50},
    {473,1631.4811,572.1327,0.0651,185.6611,50000,5,1,1,"Dinghy",30},
    {493,1638.4229,576.5723,-0.1675,192.7350,200000,5,1,1,"Jetmax",60}
    }; //Zeile 252



    Bei OnPlayerDisconnect



    public OnPlayerDisconnect(playerid, reason)
    {
    for(new i=0; i<sizeof(cInfo); i++)
    {
    if(cInfo[i][id_x]==0)continue;
    if(cInfo[i][besitzer]!=PlayerInfo[playerid][db_id])continue; //Zeile 789
    /*GetVehiclePos(cInfo[i][id_x],cInfo[i][c_x],cInfo[i][c_y],cInfo[i][c_z]);
    GetVehicleZAngle(cInfo[i][id_x],cInfo[i][c_r]);
    new query[128];
    format(query,sizeof(query),"UPDATE autos SET x='%f',y='%f',z='%f',r='%f' WHERE id='%i'",cInfo[i][c_x],cInfo[i][c_y],cInfo[i][c_z],cInfo[i][c_r],cInfo[i][db_id]);
    mysql_pquery(dbhandle,query,"","");*/
    DestroyVehicle(cInfo[i][id_x]);
    cInfo[i][id_x]=0;
    }
    savePlayer(playerid);
    getPlayerLogged(playerid) = 0;
    return 1;
    }



    Bei OnDialogResponse:



    case DIALOG_AUTOHAUS:
    {
    if(response)
    {
    //Autoverkauf notiz
    new id=GetPVarInt(playerid,"buyCarID"),query[265];
    if(getPlayerMoney(playerid)<ahCars[id][c_preis])
    {
    SendClientMessage(playerid,Rot,"Du besitzt nicht genügend Geld umd dieses Fahrzeug zu kaufen.");
    RemovePlayerFromVehicle(playerid);
    return 1;
    }
    setPlayerMoney(playerid,-ahCars[id][c_preis]);
    format(query,sizeof(query),"INSERT INTO autos (besitzer,model,x,y,z,r,name,tank) VALUES ('%s','%i','%f','%f','%f','%f','%s','%f')",cInfo[id][besitzer],cInfo[id][model],cInfo[id][c_x],cInfo[id][c_y],cInfo[id][c_z],cInfo[id][c_r],cInfo[id][c_name],cInfo[id][c_tank]); //Zeile 1174
    mysql_pquery(dbhandle,query,"carSavedToDB","i",id);
    createPlayerCar(playerid,ahCars[id][model],ahInfo[ahCars[id][ah_id]][s_x],ahInfo[ahCars[id][ah_id]][s_y],ahInfo[ahCars[id][ah_id]][s_z],ahInfo[ahCars[id][ah_id]][s_r]);
    SendClientMessage(playerid,Gruen,"Du hast das Auto erfolgreich gekauft");
    RemovePlayerFromVehicle(playerid);
    }
    else
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,Rot,"Du hast den Kauf abgebrochen");
    }
    return 1;
    }




    forward OnPlayerCarsLoad(playerid);
    public OnPlayerCarsLoad(playerid)
    {
    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 id=getFreeCarID();
    cache_get_field_content(0,"besitzer",cInfo[id][besitzer],dbhandle,50);
    cInfo[id][model]=cache_get_field_content_int(i,"model",dbhandle);
    cInfo[id][c_x]=cache_get_field_content_float(i,"x",dbhandle);
    cInfo[id][c_y]=cache_get_field_content_float(i,"y",dbhandle);
    cInfo[id][c_z]=cache_get_field_content_float(i,"z",dbhandle);
    cInfo[id][c_r]=cache_get_field_content_float(i,"r",dbhandle);
    cInfo[id][db_id]=cache_get_field_content_int(i,"id",dbhandle);
    cache_get_field_content(i,"name",cInfo[id][c_name],dbhandle,50); //Zeile 1673
    cInfo[id][c_tank]=cache_get_field_content_float(i,"tank",dbhandle);
    cInfo[id][id_x]=CreateVehicle(cInfo[id][model],cInfo[id][c_x],cInfo[id][c_y],cInfo[id][c_z],cInfo[id][c_r],-1,-1,-1);
    tank[cInfo[id][id_x]]=100;
    }
    return 1;
    }

  • Im OnPlayerCarsLoad die Schleife zu:
    for(new i=0; i<num_rows; i++)
    {
    cache_get_field_content(i,"besitzer",cInfo[id][besitzer],dbhandle,50);
    cInfo[id][model]=cache_get_field_content_int(i,"model",dbhandle);
    cInfo[id][c_x]=cache_get_field_content_float(i,"x",dbhandle);
    cInfo[id][c_y]=cache_get_field_content_float(i,"y",dbhandle);
    cInfo[id][c_z]=cache_get_field_content_float(i,"z",dbhandle);
    cInfo[id][c_r]=cache_get_field_content_float(i,"r",dbhandle);
    cInfo[id][db_id]=cache_get_field_content_int(i,"id",dbhandle);
    cInfo[id][ci_tank]=cache_get_field_content_int(i,"tank",dbhandle);
    cInfo[id][id_x]=CreateVehicle(cInfo[id][model],cInfo[id][c_x],cInfo[id][c_y],cInfo[id][c_z],cInfo[id][c_r],-1,-1,-1);
    tank[cInfo[id][id_x]]=100;
    }


    Und:
    {507,2119.9333,1397.8513,10.6391,179.5709,6500,0,1,1"Elegant",45},
    zu:
    {507,2119.9333,1397.8513,10.6391,179.5709,6500,0,1,1,"Elegant",45},


    enum carEnum{
    id_x,
    model,
    besitzer,
    Float:c_x,
    Float:c_y,
    Float:c_z,
    Float:c_r,
    Color_1,
    Color_2,
    db_id,
    ci_tank



    Hatte dir das oben noch rein editiert, hast du aber wohl nicht mehr gesehen.