Beiträge von Sharpadox

    Es speichert immernoch nicht, ich habe Probleme mit dem stock CreateFKasse()


    Code:

    Spoiler anzeigen
    stock CreateFKasse()
    {
    new query[1024], Fraktion[128];
    mysql_real_escape_string(Fraktion,Fraktion);
    for(new i=0; i<MAX_FRAKS; i++)
    {
    if(i > 0 || i < 13)
    {
    format(query, sizeof(query), "INSERT INTO `FraktionsKassen` (`Fraktion`) VALUES ('%s')", frakname(i));
    }
    }
    mysql_query(query);
    return true;
    }


    Dann zeigt es die Tabelle nur so an.


    [table='3']
    [*] Fraktion
    [*] FrakID
    [*] FKasse
    [*] La Cosa Nostra
    [*] "0"
    [*] "0"
    [*] La Cosa Nostra
    [*] "0"
    [*] "0"[/table]

    Hey, wieso kommt dieser Error? :P


    Code:

    Spoiler anzeigen
    stock SaveFKassen()
    {
    for(new i=0; i<MAX_FRAKS; i++)
    {
    if(i > 0 || i < 13)
    {
    mysql_SetInt("FraktionsKassen","Fraktion",frakname(i),"Fraktion", FKasse[i][FraktName]);
    mysql_SetInt("FraktionsKassen","FrakID",i,"Fraktion", FKasse[i][FraktName]);
    mysql_SetInt("FraktionsKassen","FKasse",FKasse[i][fKasse],"Fraktion", FKasse[i][FraktName]);
    }
    return 1;
    }
    return 1;
    }


    Error:

    Spoiler anzeigen
    C:\Users\Narushi\Desktop\samp\New-Evolution-Reallife\gamemodes\SelfmadeBT.pwn(3843) : error 035: argument type mismatch (argument 3)
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

    Spoiler anzeigen
    1 Error.

    Erstelle doch lieber neuen Thread, da es nichts mit dem alten zu tun hat..


    Also: Warum lädt mein Privatcar nicht?


    Spoiler anzeigen
    stock LoadPCars(playerid)
    {
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
    GetPlayerName(playerid,PrivatCar[playerid][PlayerName], MAX_PLAYER_NAME);
    PrivatCar[playerid][privatColor1] = mysql_GetInt("privatcars", "Color1", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][privatColor2] = mysql_GetInt("privatcars", "Color2", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][CarName] = mysql_GetString("privatcars", "Autoname", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][modelid] = mysql_GetInt("privatcars", "modelid", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][pcX] = mysql_GetFloat("privarcars", "CarX", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][pcY] = mysql_GetFloat("privarcars", "CarY", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][pcZ] = mysql_GetFloat("privarcars", "CarZ", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][pcA] = mysql_GetFloat("privarcars", "CarA", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][HaveKey] = mysql_GetInt("privarcars", "HaveKey", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][vehid] = mysql_GetInt("privarcars", "vehid", "Name",PrivatCar[playerid][PlayerName]);
    meinauto[playerid] = CreateVehicle(PrivatCar[playerid][modelid],PrivatCar[playerid][pcX],PrivatCar[playerid][pcY],PrivatCar[playerid][pcZ],PrivatCar[playerid][pcA],PrivatCar[playerid][privatColor1],PrivatCar[playerid][privatColor2],0);
    }
    return 1;
    }
    stock SavePCars(playerid)
    {
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
    GetPlayerName(playerid,PrivatCar[playerid][PlayerName], MAX_PLAYER_NAME);
    mysql_SetInt("privatcars","Color1",PrivatCar[playerid][privatColor1],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetInt("privatcars","Color2",PrivatCar[playerid][privatColor2],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetString("privatcars","Autoname",VehicleName[GetVehicleModel(GetPlayerVehicleID(playerid))-400],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetInt("privatcars","modelid",GetVehicleModel(meinauto[playerid]),"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetFloat("privatcars","CarX",PrivatCar[playerid][pcX],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetFloat("privatcars","CarY",PrivatCar[playerid][pcY],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetFloat("privatcars","CarZ",PrivatCar[playerid][pcZ],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetFloat("privatcars","CarA",PrivatCar[playerid][pcA],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetInt("privatcars","vehid",PrivatCar[playerid][vehid],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetInt("privatcars","HaveKey",PrivatCar[playerid][HaveKey],"Name", PrivatCar[playerid][PlayerName]);
    }
    }


    //push: Help *Q* :cursing:

    SetSpawnInfo(playerid, 0, 0, Float:lastx, Float:lasty, Float:lastz, Float:lasta, 0, 0, 0, 0, 0, 0);


    zu


    SetSpawnInfo(playerid, 0, 0, lastx, lasty, lastz, lasta, 0, 0, 0, 0, 0, 0);

    Noch eine Frage.. Warum spawn mein Auto nicht?
    Versuche schon seit Stunden -.-"


    stock LoadPCars(playerid)
    {
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
    GetPlayerName(playerid,PrivatCar[playerid][PlayerName], MAX_PLAYER_NAME);
    PrivatCar[playerid][privatColor1] = mysql_GetInt("privatcars", "Color1", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][privatColor2] = mysql_GetInt("privatcars", "Color2", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][CarName] = mysql_GetString("privatcars", "Autoname", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][modelid] = mysql_GetInt("privatcars", "modelid", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][pcX] = mysql_GetFloat("privarcars", "CarX", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][pcY] = mysql_GetFloat("privarcars", "CarY", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][pcZ] = mysql_GetFloat("privarcars", "CarZ", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][pcA] = mysql_GetFloat("privarcars", "CarA", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][HaveKey] = mysql_GetInt("privarcars", "HaveKey", "Name",PrivatCar[playerid][PlayerName]);
    PrivatCar[playerid][vehid] = mysql_GetInt("privarcars", "vehid", "Name",PrivatCar[playerid][PlayerName]);
    meinauto[playerid] = CreateVehicle(PrivatCar[playerid][modelid],PrivatCar[playerid][pcX],PrivatCar[playerid][pcY],PrivatCar[playerid][pcZ],PrivatCar[playerid][pcA],PrivatCar[playerid][privatColor1],PrivatCar[playerid][privatColor2],0);
    }
    return 1;
    }
    stock SavePCars(playerid)
    {
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
    GetPlayerName(playerid,PrivatCar[playerid][PlayerName], MAX_PLAYER_NAME);
    mysql_SetInt("privatcars","Color1",PrivatCar[playerid][privatColor1],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetInt("privatcars","Color2",PrivatCar[playerid][privatColor2],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetString("privatcars","Autoname",VehicleName[GetVehicleModel(GetPlayerVehicleID(playerid))-400],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetInt("privatcars","modelid",GetVehicleModel(meinauto[playerid]),"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetFloat("privatcars","CarX",PrivatCar[playerid][pcX],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetFloat("privatcars","CarY",PrivatCar[playerid][pcY],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetFloat("privatcars","CarZ",PrivatCar[playerid][pcZ],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetFloat("privatcars","CarA",PrivatCar[playerid][pcA],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetInt("privatcars","vehid",PrivatCar[playerid][vehid],"Name", PrivatCar[playerid][PlayerName]);
    mysql_SetInt("privatcars","HaveKey",PrivatCar[playerid][HaveKey],"Name", PrivatCar[playerid][PlayerName]);
    }
    }

    Hey,


    wieso kommt der Warning? ?(


    C:\Users\Narushi\Desktop\samp\New-Evolution-Reallife\gamemodes\SelfmadeBT.pwn(3756) : warning 213: tag mismatch
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Warning.


    stock mysql_GetFloat(Table[], Field[], Where[], Is[])
    {
    new query[128], Float:sqlfloat;
    mysql_real_escape_string(Table, Table);
    mysql_real_escape_string(Field, Field);
    mysql_real_escape_string(Where, Where);
    mysql_real_escape_string(Is, Is);
    format(query, 128, "SELECT `%s` FROM `%s` WHERE `%s` = '%s'", Field, Table, Where, Is);
    mysql_query(query);
    mysql_store_result();
    mysql_fetch_float(sqlfloat);
    mysql_free_result();
    return sqlfloat; //Zeile
    }