bekomme 1 Error

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
  • Ich bekomme 1Error aber warum??


    hir der Error:


    Spoiler anzeigen
    C:\Users\Fabian\Desktop\Mein Server\gamemodes\Selfmade.pwn(3850) : error 047: array sizes do not match, or destination array is too small
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

    Spoiler anzeigen
    1 Error.


    hir die zeile


    Spoiler anzeigen
    stock LoadPlayer(playerid)
    {
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
    GetPlayerName(playerid, PlayerInfo[playerid][pName], MAX_PLAYER_NAME);
    SetPlayerWantedLevel(playerid,mysql_GetInt("accounts", "WantedLevel", "Name",PlayerInfo[playerid][pName]));
    GivePlayerMoney(playerid,mysql_GetInt("accounts", "Geld", "Name", PlayerInfo[playerid][pName]));
    SetPlayerScore(playerid, mysql_GetInt("accounts", "Level", "Name", PlayerInfo[playerid][pName]));
    SetPlayerFightingStyle(playerid, mysql_GetInt("accounts", "FightingStyle", "Name",PlayerInfo[playerid][pName]));
    PlayerInfo[playerid][pKontoStand] = mysql_GetInt("accounts", "Kontostand", "Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pAlter] = mysql_GetInt("accounts","Alter","Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pWerbung] = mysql_GetInt("accounts","Werbungsanzahl","Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pTelefonbuch] = mysql_GetInt("accounts","Telefonbuch","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pHandyNummer] = mysql_GetInt("accounts","HandyNummer","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][ptutorial] = mysql_GetInt("accounts","tutorial","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pGangJail] = mysql_GetInt("accounts","GangJail","Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pPayDayTime] = mysql_GetInt("accounts","PayDayTime","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pNutzung] = mysql_GetInt("accounts","Nutzung","Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pSaveMats] = mysql_GetInt("accounts","SaveMats","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pPackete] = mysql_GetInt("accounts","MatsPakete","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pMats] = mysql_GetInt("accounts","MatsHave","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pSkin] = mysql_GetInt("accounts", "Skin", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pJob] = mysql_GetInt("accounts", "Job", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pKills] = mysql_GetInt("accounts", "Kills", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pFraktionsLeader] = mysql_GetInt("accounts", "FraktionsLeader", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pFraktionsMember] = mysql_GetInt("accounts", "FraktionsMember", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pFraktionsRange] = mysql_GetInt("accounts", "FraktionsRange", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pAdminLevel] = mysql_GetInt("accounts", "AdminLevel", "Name", PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pAutoschein] = mysql_GetInt("accounts","Autoschein","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pMotorradschein] = mysql_GetInt("accounts","Motorradschein","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pLKWschein] = mysql_GetInt("accounts","LKWschein","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pBootschein] = mysql_GetInt("accounts","Bootschein","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pWaffenschein] = mysql_GetInt("accounts","Waffenschein","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pAngelschein] = mysql_GetInt("accounts","Angelschein","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pRespektPunkte] = mysql_GetInt("accounts","Respektpunkte","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pPayDayTime] = mysql_GetInt("accounts","PayDayTime","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pGeworben] = mysql_GetString("accounts", "Geworben","Name", PlayerInfo[playerid][pName]);// DIESE ZEILE
    PlayerInfo[playerid][pBanned] = mysql_GetInt("accounts","Bann","Name",PlayerInfo[playerid][pName]);
    if(PlayerInfo[playerid][pBanned] == 1)
    {
    SendClientMessage(playerid,Rot,"Du bist vom Server gebannt.");
    Kick(playerid);
    }
    if(PlayerInfo[playerid][pTimeBanned] >= 1)
    {
    new STR[128];
    new wert;
    wert=PlayerInfo[playerid][pTimeBanned];
    format(STR,sizeof(STR),"[Name:[%s]] [Timeban noch:[%i]]",PlayerName(playerid),wert);
    ShowPlayerDialog(playerid,DIALOG_TIMEBAN,DIALOG_STYLE_MSGBOX,"TimeBan",STR,"Okay","");
    Kick(playerid);
    }
    new str[128];
    format(str,sizeof(str),"Spieler %s erfolgreich geladen!",PlayerName(playerid));
    print(str);
    }
    return 1;
    }

    Mit freundlichen Grüßen,


    Fabi.StaR :love::saint:


  • Hir das Enum:


    Spoiler anzeigen
    enum SpielerDaten
    {
    pName[MAX_PLAYER_NAME],pGeld,pLevel,
    pFraktionsLeader,pFraktionsMember,pFraktionsRange,
    pAlter,pAdminLevel,pSkin,pJob,pNutzung,pBanned,
    pAutoschein,pMotorradschein,pLKWschein,pWerbung,
    pBootschein,pWaffenschein,pAngelschein,pFlugschein,
    pTimeBanned,pWantedLevel,pGangJail,pSaveMats,pMats,
    pRespektPunkte,pPayDayTime,pKills,pHandyNummer,
    pPremium,pTelefonbuch,pFightingStyle,pKontoStand,
    pPackete,pCode,ptutorial,
    pGeworben[MAX_PLAYER_NAME],// hir
    pSpielzeit,pGeschlecht
    }
    new PlayerInfo[MAX_PLAYERS][SpielerDaten];

    Mit freundlichen Grüßen,


    Fabi.StaR :love::saint:


  • versuch erstmal, wenn du das MAX_PLAYER_NAME durch 12 oder so ersätzt


    Du weißt schon das MAX_PLAYER_NAME als 24 definiert ist ? Das spielt doch keine Rolle..



    MFG

    Main: CPU: Intel Core i5-4440 @ 3,10 GHz | CPU-Cooling: Matterhorn -PURE- | RAM: 16GB Crucial Ballistix Sport DDR3-1600 DIMM CL9-9-9-24 |
    Motherboard: ASRock B85M Pro4 | GPU: Sapphire Radeon R9 390X Nitro 8GB GDDR5 |

    SSD: Samsung SSD 840 Evo 500GB | Power Supply: 550 Watt Corsair CS Series Modular 80+ Gold | Case: beQuiet! Silent Base 800


    As I walk through the valley of the shadow of death
    I take a look at my life and realize there's nothin' left.

  • mit 24 hab ich versucht kommt immer noch der error


    wenn ich aus :


    Spoiler anzeigen
    stock mysql_GetString(Table[], Field[], Where[], Is[])
    {
    new query[128], Get[128];
    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_row(Get);
    mysql_free_result();
    return Get;
    }


    das mache:


    Spoiler anzeigen
    stock mysql_GetString(Table[], Field[], Where[], Is[])
    {
    new query[128], Get[128];
    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_row(Get);
    mysql_free_result();
    return true;
    }


    mach bekomme ich keine Errors

    Mit freundlichen Grüßen,


    Fabi.StaR :love::saint:


    Einmal editiert, zuletzt von Fabi.StaR ()