Beiträge von Sharpadox

    Hey,


    ich bekomme es einfach nicht hin mit meinem Textdraw Chat in einer Box.
    So sieht das ganze Ding aus:


    0-29 sind die Textdraws "ChatZeile[0] - ChatZeile[29]" mit jeweils einen String, der deren Inhalt widerspiegelt: "ChatInhalt[0] - ChatInhalt[29]".
    Nun möchte ich, wenn jemand etwas reinschreibt, dass alles ein Strück nach oben rückt, und die neuste Nachricht unten (ChatZeile[0]) steht,
    jedoch bekomme ich das einfach nicht hin, dass es auch funktioniert. Wie kann ich das machen?


    Ich habe diese 2 Varianten versucht, und beides ist fehlgeschlagen: Hat einer noch eine Idee?

    // -- Versuch 1 --
    stock ChatInput(playerid, text[])
    {
    new Ausgabe[128];
    format(Ausgabe,128,"~b~%s:~w~ %s",GetName(playerid),text);
    new x=28;
    for(new i=29; i>0; i--)
    {
    format(ChatInhalt[i],128,"%s",ChatInhalt[x]);
    TextDrawSetString(ChatZeile[i],ChatInhalt[i]);
    x--;
    if(x == 0)
    {
    format(ChatInhalt[i],128,"%s",ChatInhalt[x]);
    TextDrawSetString(ChatZeile[i],ChatInhalt[i]);
    TextDrawSetString(ChatZeile[0],Ausgabe);
    format(ChatInhalt[0],128,"%s",Ausgabe);
    break;
    }
    }
    return 1;
    }


    // -- Versuch 2 --
    stock ChatInput(playerid, text[])
    {
    for(new i=29; i>0; i--)
    {
    switch(i)
    {
    case 29:{
    format(ChatInhalt[i],128,"_");
    TextDrawSetString(ChatZeile[i],"_");
    }
    case 0..27:{
    format(ChatInhalt[i+1],128,ChatInhalt[i]);
    TextDrawSetString(ChatZeile[i+1],ChatInhalt[i]);
    if(i==0){
    new output[128];
    format(output,128,"%s: %s", GetName(playerid),text);
    }
    }
    }
    }
    return 1;
    }

    Hallo,


    ich habe plötzlich 26 Errors, warum?
    Mein Code ist alles richtig, eben ging alles noch -.-
    Laut Klammerfehler.exe gibts auch keine Klammerfehler.


    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(144) : error 017: undefined symbol "Load"
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(145) : error 017: undefined symbol "SetRankings"
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(430) : error 017: undefined symbol "ShowRankings"
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(436) : error 017: undefined symbol "SpawnInVehicle"
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(553) : error 001: expected token: ")", but found "}"
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(553) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(555) : warning 217: loose indentation
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(558) : warning 217: loose indentation
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(558) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(558) : error 004: function "OnVehicleMod" is not implemented
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(563) : warning 225: unreachable code
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(563) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(563) : error 004: function "OnVehiclePaintjob" is not implemented
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(568) : warning 225: unreachable code
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(568) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(568) : error 004: function "OnVehicleRespray" is not implemented
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(573) : warning 225: unreachable code
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(573) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(573) : error 004: function "OnPlayerSelectedMenuRow" is not implemented
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(578) : warning 225: unreachable code
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(578) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(578) : error 004: function "OnPlayerExitedMenu" is not implemented
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(583) : warning 225: unreachable code
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(583) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(583) : error 004: function "OnPlayerInteriorChange" is not implemented
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(588) : warning 225: unreachable code
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(588) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(588) : error 004: function "OnPlayerKeyStateChange" is not implemented
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(593) : warning 225: unreachable code
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(593) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(593) : error 004: function "OnRconLoginAttempt" is not implemented
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(598) : warning 225: unreachable code
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(598) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(598) : error 004: function "OnPlayerUpdate" is not implemented
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(603) : warning 225: unreachable code
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(603) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\gamemodes\xyz.pwn(603) : error 004: function "OnPlayerStreamIn" is not implemented


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



    26 Errors.

    Hey,


    wieso beendet mein Splitter einfach mein OnGameModeInit ^^..
    Also hier mein Code:
    print("x_1");
    TimestampToMS("12:45.492");
    print("x_2");


    "x_1" wird angezeigt, aber das "x_2" dann nichtmehr (Steht alles unter OnGameModeInit);


    Hier der Stock:
    _stock TimestampToMS(stamp[])
    {
    new tmp1[2][5], tmp2[2][5];
    split(stamp,tmp1,':');
    split(tmp1[1],tmp2,'.');
    new ms = (strval(tmp1[0])*60000)+(strval(tmp2[0])*1000)+strval(tmp2[1]);
    }

    Also so bekommst du das nicht gehookt.


    idR hookt man auch nur die standard Callbacks / Natives.
    PAWN unterstützt halt nur 31, dir fehlt also ein Zeichen.


    Ich würde eher OnPlayerPickUpPickup hooken, statt das vom Streamerplugin zu nehmen


    Aber das Problem ist, dass ich nur Dynamische Pickups verwende, da ich viele brauche. Aber, okay, wenn es nicht geht, trotzdem danke ;)

    Hey,


    wie kann ich den public OnPlayerPickUpDynamicPickup hooken ohne Warning?
    Ich bekomme diesen Warning:
    C:\Users\Chris\Desktop\Scripting\PAWN\Selfmade\pawno\include\rMTA.inc(97) : warning 200: symbol "_ALS_OnPlayerPickUpDynamicPicku" is truncated to 31 characters
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Warning.


    Zeilen:
    #if defined _ALS_OnPlayerPickUpDynamicPickup //betroffene Zeile
    #undef OnPlayerPickUpDynamicPickup
    #else
    #define _ALS_OnPlayerPickUpDynamicPickup
    #endif
    #define OnPlayerPickUpDynamicPickup _OnPlayerPickUpDynamicPickup