Beiträge von Maho

    Hallo hab ein problem beim abspeichern :(


    Code
    [23:38:16] [plugins/mysql] error #1064 while executing query "UPDATE server_crews SET CrewName ='LaFam', 'CrewLeader='iTsMaho', CrewKasse='50000', CrewWins='50', CrewLoses='49', HealUpgrade='1', ArmourUpgrade='1', ShotgunUpgrade='1', MP5Upgrade='1', M4Upgrade='1', SniperUpgrade='1' WHERE ID=0": You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''CrewLeader='iTsMaho', CrewKasse='50000', CrewWins='50', CrewLoses='49', HealUpg' at line 1 (D:\iTsMaho Selfmade\gamemodes\selfmade.pwn:138 -> D:\iTsMaho Selfmade\pawno\include\alt_dialogs.inc:301 -> D:\iTsMaho Selfmade\pawno\include\YSI_Data\y_foreach\..\..\YSI_Core\y_core\y_scriptinit_impl.inc:400)
    [23:38:16] [plugins/mysql] error #1064 while executing query "UPDATE server_crews SET CrewName ='test', 'CrewLeader='iTsTest', CrewKasse='4000', CrewWins='20', CrewLoses='19', HealUpgrade='1', ArmourUpgrade='1', ShotgunUpgrade='1', MP5Upgrade='1', M4Upgrade='1', SniperUpgrade='1' WHERE ID=0": You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''CrewLeader='iTsTest', CrewKasse='4000', CrewWins='20', CrewLoses='19', HealUpgr' at line 1 (D:\iTsMaho Selfmade\gamemodes\selfmade.pwn:138 -> D:\iTsMaho Selfmade\pawno\include\alt_dialogs.inc:301 -> D:\iTsMaho Selfmade\pawno\include\YSI_Data\y_foreach\..\..\YSI_Core\y_core\y_scriptinit_impl.inc:400)
    [23:38:16] [plugins/mysql] error #1064 while executing query "UPDATE server_crews SET CrewName ='test2', 'CrewLeader='iTsTest2', CrewKasse='300', CrewWins='50', CrewLoses='19', HealUpgrade='1', ArmourUpgrade='1', ShotgunUpgrade='1', MP5Upgrade='1', M4Upgrade='1', SniperUpgrade='1' WHERE ID=0": You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''CrewLeader='iTsTest2', CrewKasse='300', CrewWins='50', CrewLoses='19', HealUpgr' at line 1 (D:\iTsMaho Selfmade\gamemodes\selfmade.pwn:138 -> D:\iTsMaho Selfmade\pawno\include\alt_dialogs.inc:301 -> D:\iTsMaho Selfmade\pawno\include\YSI_Data\y_foreach\..\..\YSI_Core\y_core\y_scriptinit_impl.inc:400)
    [23:38:16] [plugins/mysql] CCallback::Execute - invalid AMX instance
    [23:38:16] [plugins/mysql] CCallback::Execute - invalid AMX instance
    [23:38:16] [plugins/mysql] CCallback::Execute - invalid AMX instance

    code:

    Code
    for(new i; i < MAX_CREWS; i++)
        {
            if(!Iter_Contains(CREWs, i))continue;
            new query[356];
            mysql_format(handle, query, sizeof(query), "UPDATE server_crews SET CrewName ='%s', 'CrewLeader='%s', CrewKasse='%d', CrewWins='%d', CrewLoses='%d', HealUpgrade='%d', ArmourUpgrade='%d', ShotgunUpgrade='%d', MP5Upgrade='%d', M4Upgrade='%d', SniperUpgrade='%d' WHERE ID=%d", CrewInfo[i][CrewName], CrewInfo[i][CrewLeader], CrewInfo[i][CrewKasse], CrewInfo[i][CrewWins], CrewInfo[i][CrewLoses], CrewInfo[i][HealUpgrade], CrewInfo[i][ArmourUpgrade], CrewInfo[i][ShotgunUpgrade], CrewInfo[i][MP5Upgrade], CrewInfo[i][M4Upgrade], CrewInfo[i][SniperUpgrade], CrewInfo[i][CrewID]);
             mysql_tquery(handle, query);
              printf("id: %i name: %s leader: %s kasse: %i cwins: %i closes: %i heal: %i armour: %i shotgun: %i mp5: %i m4: %i sniper: %i", CrewInfo[i][CrewID], CrewInfo[i][CrewName], CrewInfo[i][CrewLeader], CrewInfo[i][CrewKasse], CrewInfo[i][CrewWins], CrewInfo[i][CrewLoses], CrewInfo[i][HealUpgrade], CrewInfo[i][ArmourUpgrade], CrewInfo[i][ShotgunUpgrade], CrewInfo[i][MP5Upgrade], CrewInfo[i][M4Upgrade], CrewInfo[i][SniperUpgrade]);
           }

    //edit bekomme beim abspeichern Fehler.


    Code
    [18:36:51] [plugins/mysql] error #1064 while executing query "UPDATE server_crews SET CrewName ='LaFam', 'CrewLeader='iTsMaho', CrewKasse='50000', CrewWins='50', CrewLoses='49', HealUpgrade='1', ArmourUpgrade='1', ShotgunUpgrade='1', MP5Upgrade='1', M4Upgrade='1', SniperUpgrade='1' WHERE ID=0": You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''CrewLeader='iTsMaho', CrewKasse='50000', CrewWins='50', CrewLoses='49', HealUpg' at line 1 (D:\iTsMaho Selfmade\gamemodes\selfmade.pwn:138 -> D:\iTsMaho Selfmade\pawno\include\alt_dialogs.inc:301 -> D:\iTsMaho Selfmade\pawno\include\YSI_Data\y_foreach\..\..\YSI_Core\y_core\y_scriptinit_impl.inc:400)
    [18:36:51] [plugins/mysql] error #1064 while executing query "UPDATE server_crews SET CrewName ='test', 'CrewLeader='iTsTest', CrewKasse='4000', CrewWins='20', CrewLoses='19', HealUpgrade='1', ArmourUpgrade='1', ShotgunUpgrade='1', MP5Upgrade='1', M4Upgrade='1', SniperUpgrade='1' WHERE ID=0": You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''CrewLeader='iTsTest', CrewKasse='4000', CrewWins='20', CrewLoses='19', HealUpgr' at line 1 (D:\iTsMaho Selfmade\gamemodes\selfmade.pwn:138 -> D:\iTsMaho Selfmade\pawno\include\alt_dialogs.inc:301 -> D:\iTsMaho Selfmade\pawno\include\YSI_Data\y_foreach\..\..\YSI_Core\y_core\y_scriptinit_impl.inc:400)
    [18:36:51] [plugins/mysql] error #1064 while executing query "UPDATE server_crews SET CrewName ='test2', 'CrewLeader='iTsTest2', CrewKasse='300', CrewWins='50', CrewLoses='19', HealUpgrade='1', ArmourUpgrade='1', ShotgunUpgrade='1', MP5Upgrade='1', M4Upgrade='1', SniperUpgrade='1' WHERE ID=0": You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''CrewLeader='iTsTest2', CrewKasse='300', CrewWins='50', CrewLoses='19', HealUpgr' at line 1 (D:\iTsMaho Selfmade\gamemodes\selfmade.pwn:138 -> D:\iTsMaho Selfmade\pawno\include\alt_dialogs.inc:301 -> D:\iTsMaho Selfmade\pawno\include\YSI_Data\y_foreach\..\..\YSI_Core\y_core\y_scriptinit_impl.inc:400)
    [18:36:51] [log-core] exception 0XC0000005 (ACCESS_VIOLATION) from Vectored Exception Handler catched; shutting log-core down

    Code:

    Code
        for(new i; i < MAX_CREWS; i++)
        {
            if(!Iter_Contains(CREWs, i))continue;
            new query[356];
            mysql_format(handle, query, sizeof(query), "UPDATE server_crews SET CrewName ='%s', 'CrewLeader='%s', CrewKasse='%d', CrewWins='%d', CrewLoses='%d', HealUpgrade='%d', ArmourUpgrade='%d', ShotgunUpgrade='%d', MP5Upgrade='%d', M4Upgrade='%d', SniperUpgrade='%d' WHERE ID=%d", CrewInfo[i][CrewName], CrewInfo[i][CrewLeader], CrewInfo[i][CrewKasse], CrewInfo[i][CrewWins], CrewInfo[i][CrewLoses], CrewInfo[i][HealUpgrade], CrewInfo[i][ArmourUpgrade], CrewInfo[i][ShotgunUpgrade], CrewInfo[i][MP5Upgrade], CrewInfo[i][M4Upgrade], CrewInfo[i][SniperUpgrade], CrewInfo[i][CrewID]);
             mysql_tquery(handle, query);
              printf("id: %i name: %s leader: %s kasse: %i cwins: %i closes: %i heal: %i armour: %i shotgun: %i mp5: %i m4: %i sniper: %i", CrewInfo[i][CrewID], CrewInfo[i][CrewName], CrewInfo[i][CrewLeader], CrewInfo[i][CrewKasse], CrewInfo[i][CrewWins], CrewInfo[i][CrewLoses], CrewInfo[i][HealUpgrade], CrewInfo[i][ArmourUpgrade], CrewInfo[i][ShotgunUpgrade], CrewInfo[i][MP5Upgrade], CrewInfo[i][M4Upgrade], CrewInfo[i][SniperUpgrade]);
           }

    Geladen wird es so:


    Compile nochmal...das sieht aus, als ob das noch der alte Code ist, wo i=1 war...

    Hab ich geht immer noch nicht.



    Und oben setzte ich ja :

    cache_get_value_name_int(i, "CrewID", CrewInfo[i][CrewID]);


    aber printen tuhe ich ja bei ("id : %i, i") wenn ich anstat i CrewInfo[i][CrewID] einsetze klappt es.

    Aber ich weiß nicht ob das so richtig ist.

    Sei doch so gütig und zeige uns, wie der Code dazu aussieht...

    Ups :D


    Oke ich fange jetzt an von null zu laden aber ich hab ein kleines problem.


    Geprintet wird:

    Code
    id: 1 name: test leader: t  kasse: 4000 cwins: 20 closes: 19 heal: 0 armour: 1 shotgun: 0 mp5: 0 m4: 1 sniper: 1
    id: 2 name: test2 leader: t kasse: 0 cwins: 50 closes: 19 heal: 0 armour: 1 shotgun: 0 mp5: 0 m4: 1 sniper: 1
    [MYSQL] Es wurden 2 Crews geladen.

    Die Crew 1337 währe eigentlich die ID 1


    Aber in der Datenbank sieht es so aus.

    loadfscre.PNG

    Magie:

    Einfach zu:


    C
    for(new i=1; i < rows; i++)

    Danke für die schnelle antwort.


    ...aaaber warum auch immer man das wollen würde...

    Also in der Datenbank hat die erste crew die ID 1 ka wieso nicht null.

    Aber passt so weil beim LoadPlayer nutze ich folgendes:

    Code
            if(PlayerInfo[playerid][Crew] > 0)
            {
                new str[126];
                format(str, sizeof(str), "Du bist Mitglied der Crew: %s", CrewInfo[PlayerInfo[playerid][Crew]][cName]);
                SendClientMessage(playerid, ROT, str);
            }

    Hallo ist das möglich das die schleife bei 1 anfängt zu zählen?

    mein code:

    OPAWNO!!!!

    Ka ich habs aufjedenfall jetzt.


    //edit

    Was komisch ist.

    Ich habe eine Include wo alle Getränk automaten geladen werden.

    Und dort werden auch 3DTextLabel erstellt:

    Code
    format(label_string, sizeof(label_string), ""#HTML_ORANGE"Getränke\n"#HTML_WHITE"Kosten: 50$\nVerwende Taste "#HTML_GREEN"'N'");

    Und ingame steht ganz normal Getränke und nicht Getr�nke

    PawnFox gefällt mir nicht.

    PawnStar ä, ü und ö verbuggt z.B. bei 3DTextLabel

    PawnIT werde ich mir anschauen.

    JaoPl auch danke dir.


    //EDIT habe oPAWN noch in einem alten Gamemode gefunden.

    Doch weiß jemand warum ä, ü und ö ´s verbuggt sind z.B. bei 3DTextLabel, SendClientMessage


    Beispiel:

    Ich schreibe:

    Code
    spawn_label[0] = CreateDynamic3DTextLabel(""#HTML_ORANGE"Deagle Arena\n"#HTML_WHITE"Rüstung: Nein\n Taste "#HTML_GREEN"'ALT'", 0x1ABC9CFF, 1141.6463, -2034.4628, 68.5478 +0.5, 10.0, .testlos = 0);

    So bald ich oPAWN neustarte wird aus Rüstung = R�stung.

    InGame zeigt er es so an:bfexam.PNG


    Und wenn ich es mit R�stung Compile zeigt er es ingame so an:

    bfexam2.PNG

    Ich empfehle als Alternative: VSCode

    Ja aber ich finde bei oPAWN halt die funktionen geil.


    Object-Converter, Color-Picker, Dialog-Creator, Include-Liste, Variablen, Skin-IDs, Waffen-IDs, Fahrzeug-IDs, xyz-Converter.

    Bleibt doch mal jetzt beim Thema jungs!!!!


    Also ich eigentlich würde ich GDM empfehlen aber die haben vor 2-3 Jahren mein Bruder weggebannt weil er angeblich HeadFetz benutzt haben soll. Ist ein sehr tolles script wirklich mit Liebe Entwickelt wurden aber die Teammitglieder sind nicht dafür geeignet musste 4 Tage im Teamspeak warten bis ein Admin mal da war, als ein Hacker auf dem Server war.

    klappt immernoch nicht :/

    ouh sry hab mir das nur bis zu Hälfte durchgelesen dachte du möchtest das der der schießt das Label bekommt. Sry


    Sonnst sehe ich dort kein Fehler🤔


    //edit
    Versuch es mal so

    Code
    SetTimerEx("@DeleteDmgDraw",1000*10,0,"ii",issuerid,_:CreatePlayer3DTextLabel(issuerid,string, 0xFF0000FF, x,y,z, 20.0, 0, 0, 0));

    CreatePlayer3DTextLabel hat noch 2 Zusatz Parameter, die in Create3DTextLabel nicht vorhanden sind.

    Wärst du bereit so ein INC für MySQL zu machen?
    Die Voraussetzung währe eigentlich, dass die Spalten in der DB genau so heißen wie im Enum oder nicht?