Beiträge von KinGRaPTiiC

    Hey ich habe ein Problem und zwar verstehe ich nicht wieso ich ständig errors bekomme wenn ich es versuche wie ich will :( vielleicht hat ja einer einen Plan auf jeden fall das sind die Errors:
    C:\Users\Dusti\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3117) : error 029: invalid expression, assumed zero
    C:\Users\Dusti\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3117) : warning 215: expression has no effect
    C:\Users\Dusti\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3117) : error 001: expected token: ";", but found "return"
    C:\Users\Dusti\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3121) : error 014: invalid statement; not in switch
    C:\Users\Dusti\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3121) : warning 215: expression has no effect
    C:\Users\Dusti\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3121) : error 001: expected token: ";", but found ":"
    C:\Users\Dusti\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3121) : error 029: invalid expression, assumed zero
    C:\Users\Dusti\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3121) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    6 Errors.



    Nicht wundern wenn der Code noch ein wenig komisch aussieht... aber hab halt nur versuch wie ich es checke aber anders kann ich es mir nicht vorstellen ?(?(:huh:


    if(dialogid == DIALOG_STADTHALLE)
    {
    if(response)
    {
    switch(listitem)
    {
    case 0: if(PlayerInfo[playerid][pPerso]!=1))return SendClientMessage(playerid,DUNKELROT,"Du hast bereits einen Personalausweis!"), //3117
    SendClientMessage(playerid,DUNKELGRÜN,"Du konntest beweisen das du Bürger des Staates San Andreas bist und hast somit deinen Personalausweis erhalten!"),
    PlayerInfo[playerid][pPerso]=1,
    SaveUserStats(playerid);
    case 1: ShowPlayerDialog(playerid, DIALOG_JOBS, DIALOG_STYLE_LIST, "[vR]Jobauswahl", //3321
    "Busfahrer\n\
    Landwirt\n\
    Straßenfeger\n",
    "Auswählen", "Abbrechen");
    case 2: SendClientMessage(playerid,GRAU,"Du hast dir einen Angelschein besorgt!");
    }
    return 1;
    }
    }
    if(dialogid == DIALOG_JOBS)
    {
    if(response)
    {
    switch(listitem)
    {
    case 0: if(PlayerInfo[playerid][pPerso]!=1)
    SendClientMessage(playerid,ORANGE,"Du bist nun als Busfahrer tätig!");
    case 1: SendClientMessage(playerid,ORANGE,"Du bist nun als Landwirt tätig!");
    case 2: SendClientMessage(playerid,ORANGE,"Du bist nun als Straßenfeger tätig!");
    }
    return 1;
    }
    }
    return 0;
    }

    Das meiste handelt sich immer noch um die selben zeilen nur das ich jetzt dbhandle zu handle geändert....


    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2074) : error 035: argument type mismatch (argument 3)
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2105) : error 035: argument type mismatch (argument 3)
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3086) : error 017: undefined symbol "cache_get_data"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3091) : warning 213: tag mismatch
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3092) : warning 213: tag mismatch
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3093) : warning 213: tag mismatch
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3094) : warning 213: tag mismatch
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3095) : warning 213: tag mismatch
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3096) : warning 213: tag mismatch
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3097) : warning 213: tag mismatch
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3085) : warning 203: symbol is never used: "num_fields"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3105) : warning 202: number of arguments does not match definition
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    3 Errors.

    @The Sensei


    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2074) : error 035: argument type mismatch (argument 3)
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2105) : error 035: argument type mismatch (argument 3)
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3086) : error 017: undefined symbol "cache_get_data"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3091) : error 017: undefined symbol "dbhandle"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3092) : error 017: undefined symbol "dbhandle"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3093) : error 017: undefined symbol "dbhandle"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3094) : error 017: undefined symbol "dbhandle"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3095) : error 017: undefined symbol "dbhandle"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3096) : error 017: undefined symbol "dbhandle"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3097) : error 017: undefined symbol "dbhandle"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3085) : warning 203: symbol is never used: "num_fields"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3105) : warning 202: number of arguments does not match definition
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    10 Errors.


    public OnPlayerCarsLoad(playerid)
    {
    new num_fields,num_rows; //3085
    cache_get_data(num_rows,num_fields,dbhandle);//3086
    if(!num_rows)return 1;
    for(new i=0; i<num_rows; i++)
    {


    saveCarToDB(playerid,carid)
    {
    new query[256];
    format(query,sizeof(query),"INSERT INTO autos (besitzer,model,x,y,z,r) VALUES ('%i','%i','%f','%f','%f','%f')",PlayerInfo[playerid][p_id],cInfo[carid][model],cInfo[carid][c_x],cInfo[carid][c_y],cInfo[carid][c_z],cInfo[carid][c_r]);mysql_query(handle,query);
    mysql_pquery(handle, query,true,"carSavedToDB","i",carid);//2105
    return 1;
    }

    Hey habe ein kleines bis großes Problem....
    Meine Errors:
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2073) : error 035: argument type mismatch (argument 3)
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2104) : error 035: argument type mismatch (argument 3)
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3085) : error 017: undefined symbol "cache_get_data"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3090) : error 017: undefined symbol "cache_get_field_content_int"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3091) : error 017: undefined symbol "cache_get_field_content_int"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3092) : error 017: undefined symbol "cache_get_field_content_Float"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3093) : error 017: undefined symbol "cache_get_field_content_Float"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3094) : error 017: undefined symbol "cache_get_field_content_Float"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3095) : error 017: undefined symbol "cache_get_field_content_Float"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3096) : error 017: undefined symbol "cache_get_field_content_int"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3084) : warning 203: symbol is never used: "num_fields"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(3103) : warning 202: number of arguments does not match definition
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    Meine Codes mit den Fehlern direkt markiert:


    public carSavedToDB(carid)
    {
    cInfo[carid][db_id]=cache_insert_id(handle);//3103
    return 1;
    }


    public OnPlayerCarsLoad(playerid)
    {
    new num_fields,num_rows; //3085
    cache_get_data(num_rows,num_fields,dbhandle);//3086
    if(!num_rows)return 1;
    for(new i=0; i<num_rows; i++)
    {
    new id=getFreeCarID();
    cInfo[id][model]=cache_get_field_content_int(i,"model",dbhandle);//3090
    cInfo[id][besitzer]=cache_get_field_content_int(i,"besitzer",dbhandle);//3091
    cInfo[id][c_x]=cache_get_field_content_Float(i,"x",dbhandle);//3092
    cInfo[id][c_y]=cache_get_field_content_Float(i,"y",dbhandle);//3093
    cInfo[id][c_z]=cache_get_field_content_Float(i,"z",dbhandle);//3094
    cInfo[id][c_r]=cache_get_field_content_Float(i,"r",dbhandle);//3095
    cInfo[id][db_id]=cache_get_field_content_int(i,"id",dbhandle);//3096
    CreateVehicle(cInfo[id][model],cInfo[id][c_x],cInfo[id][c_y],cInfo[id][c_z],cInfo[id][c_r],-1,-1,-1);
    }
    return 1;
    }


    loadPlayerCars(playerid)
    {
    new query[128];
    format(query,sizeof(query),"SELECT * FROM autos WHERE besitzer='%i'",PlayerInfo[playerid][p_id]);
    mysql_pquery(handle, query,true,"OnPlayerCarsLoad","i",playerid);//2073
    return 1;
    }


    saveCarToDB(playerid,carid)
    {
    new query[256];
    format(query,sizeof(query),"INSERT INTO autos (besitzer,model,x,y,z,r) VALUES ('%i','%i','%f','%f','%f','%f')",PlayerInfo[playerid][p_id],cInfo[carid][model],cInfo[carid][c_x],cInfo[carid][c_y],cInfo[carid][c_z],cInfo[carid][c_r]);mysql_query(handle,query);
    mysql_pquery(handle, query,true,"carSavedToDB","i",carid);//2105
    return 1;
    }



    Sollte ich etwas vergessen haben einfach bescheid sagen ist mir grad ein wenig viel :D

    Habe wohl einen Klammefehler finde ihn aber nicht :(


    ocmd:exit(playerid,params[])
    {
    if(GetPlayerVirtualWorld(playerid) == 1)
    {
    if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,1085.0936,-1226.3617,15.8203);
    SetPlayerVirtualWorld(playerid,0);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,270);
    SendClientMessage(playerid,GRAU,"Du hast die Ballas Base verlassen!");
    }
    else if(GetPlayerVirtualWorld(playerid) == 2)
    {
    if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid,0);
    SetPlayerPos(playerid,2143.6633,-1802.3103,16.1406);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,270);
    SendClientMessage(playerid,GRAU,"Du hast die Hitman Base verlassen!");
    }
    else if(GetPlayerVirtualWorld(playerid) == 3)
    {
    if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid,0);
    SetPlayerPos(playerid,2495.4055,-1687.8857,13.5166);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,0);
    SendClientMessage(playerid,GRAU,"Du hast die Groove Street Base verlassen!");
    }
    else if(GetPlayerVirtualWorld(playerid) == 4)
    {
    if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerPos(playerid,-2721.3125,-316.9236,7.8438);
    SendClientMessage(playerid,GRAU,"Du hast die Triadenbase verlassen!");
    }
    else if(GetPlayerVirtualWorld(playerid) == 5)
    {
    if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerFacingAngle(playerid, 180);
    SetPlayerPos(playerid,-2623.6453,1409.7599,7.0938);
    SendClientMessage(playerid,GRAU,"Du hast die Cali Kartell Base verlassen!");
    }
    else if(GetPlayerVirtualWorld(playerid) == 6)
    {
    if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerFacingAngle(playerid, 180);
    SetPlayerPos(playerid,1507.8292,730.5375,10.8203);
    SendClientMessage(playerid,GRAU,"Du hast die Yakuza Base verlassen!");
    }
    else
    {
    SendClientMessage(playerid,DUNKELROT,"Du kannst hier nichts verlassen!");
    }
    return 1;
    }


    will halt wenn er einfach /exit eingibt das die nachricht kommt Du kannst hier nichts verlassen


    Meine Errors:
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(204) : error 017: undefined symbol "MySQL_SetupConnection"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(210) : error 017: undefined symbol "AntiDeAMX"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(1986) : error 017: undefined symbol "SaveUserStats"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2047) : error 017: undefined symbol "SpielerName"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2127) : error 017: undefined symbol "sscanf"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2128) : error 017: undefined symbol "SpielerName"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2147) : error 017: undefined symbol "sscanf"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2150) : error 017: undefined symbol "SpielerName"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2168) : error 017: undefined symbol "sscanf"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2169) : error 017: undefined symbol "SpielerName"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2178) : error 017: undefined symbol "sscanf"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2179) : error 017: undefined symbol "SpielerName"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2181) : error 017: undefined symbol "SpielerName"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2221) : error 017: undefined symbol "sscanf"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2225) : error 017: undefined symbol "SpielerName"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2227) : error 017: undefined symbol "SpielerName"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2229) : error 017: undefined symbol "SaveUserStats"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2238) : error 017: undefined symbol "sscanf"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2240) : error 017: undefined symbol "SaveUserStats"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2251) : error 017: undefined symbol "SaveUserStats"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2261) : error 017: undefined symbol "sscanf"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2264) : error 017: undefined symbol "SpielerName"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2265) : error 017: undefined symbol "SpielerName"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2268) : error 017: undefined symbol "SaveUserStats"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2301) : error 017: undefined symbol "sscanf"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\selfmade.pwn(2407) : error 079: inconsistent return types (array & non-array)


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    26 Errors.

    Wie lasse ich die Fahrzeuge jetzt laden?


    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][p_id])continue;
    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]);
    }
    if(IsPlayerNPC(playerid)) return 1;
    aduty[playerid]=false;
    KillTimer(Payday[playerid]);
    SaveUserStats(playerid);
    return 1;
    }


    Bin ziemlich neu im Gebiet MySQL und ich weiß nicht wie ich die Query ausführen soll :/

    @Douq


    Sry hab das falsche eingefügt so sieht es aus:


    saveCarToDB(playerid,carid)
    {
    new query[256];
    format(query,sizeof(query),"INSERT INTO autos (besitzer,model,x,y,z,r) VALUES ('%i','%i','%f,'%f','%f','%f')",PlayerInfo[playerid][p_id],cInfo[carid][model],cInfo[carid][c_x],cInfo[carid][c_y],cInfo[carid][c_z],cInfo[carid][c_r]);
    mysql_query(handle,query);
    cInfo[carid][cardb] = cache_insert_id();
    return 1;
    }


    Aber es wird echt nicht gespeichert ...

    @Manuel benutze R41


    @Douq Also ich hab es jetzt so geändert:


    saveCarToDB(playerid,carid)
    {
    new query[256];
    format(query,sizeof(query),"INSERT INTO autos (besitzer,model,x,y,z,r) VALUES ('%i','%i','%f,'%f','%f','%f')",PlayerInfo[playerid][p_id],cInfo[carid][model],cInfo[carid][c_x],cInfo[carid][c_y],cInfo[carid][c_z],cInfo[carid][c_r]);
    mysql_query(handle,query);
    cInfo[carid][cardb] = cache_insert_id();
    return 1;
    }


    Und trotzdem wird es nicht in der DB gespeichert :(