Problem mit Callback

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
  • Hey, ich habe ein Problem mit SSCANF..
    Es kommt immer:

    Zitat

    Run time error 19: "File or function is not found"


    Wenn ich den Server starte kommt:


    Aber
    der Debug sagt:

    Zitat

    [17:25:59] [debug] SSCANF_Init
    [17:25:59] [debug] SSCANF_Join
    [17:25:59] [debug] SSCANF_Leave

    b_560_95_1.png[/url]



    b_560_95_1.png[/url]

    Einmal editiert, zuletzt von _Infinity_ ()

  • Hast du die neuste Version des SA:MP Servers und des Plugins?

  • Hast du die neuste Version des SA:MP Servers und des Plugins?

    Ja, das geht jetzt :)
    Nur jetzt Beendet sich der Server Direkt nach dem Starten.
    Print ergibt, das er hier Endet:
    print(" AC: Initialisiering ...");
    Hier mal die Zeilen:

    print(" AC: Initialisiering ...");
    ParseCurrentSettings();
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {


    DTAC_Player[i][apConnected] = true;
    DTAC_Player[i][apMoney] = GetPlayerMoney(i);
    DTAC_Player[i][apFreeTime] = 3;
    DTAC_Player[i][apSpamMessages] = 0;
    GetPlayerHealth(i, DTAC_Player[i][apHealth]);
    GetPlayerArmour(i, DTAC_Player[i][apArmour]);
    GetPlayerPos(i, DTAC_Player[i][apPosition][0], DTAC_Player[i][apPosition][1], DTAC_Player[i][apPosition][2]);
    GetPlayerFacingAngle(i, DTAC_Player[i][apAngle]);
    DTAC_Player[i][apLastSpawned] = 0;
    DTAC_Player[i][apWarns] = 0;
    DTAC_Player[i][apMuted] = 0;
    }
    }
    SetTimer("OnPlayerWanted", 1000, true);
    UpdateTimer = SetTimer("OnAnticheatUpdate", 1000, true);
    return 1;
    }


    edit:
    die Funktion von ParseCurrentSettings
    forward ParseCurrentSettings();
    public ParseCurrentSettings()
    {
    LogText("Load configuration ...");
    new File:configfile;
    new line[128]; // TODO: Set higher if doesn't read config correct
    new ini_key[64], ini_value[64];
    new index;


    ResetConfig();


    configfile = fopen("DT_AntiCheat/config.ini", io_read);
    if(!configfile) return false; // File does not exists


    while(fread(configfile, line) != 0)
    {
    // First, remove the "\r\n"
    line[strlen(line) - 2] = 0;
    // Let's start parsing :)
    index = str_find(line, sizeof(line), '=', 0);
    if(line[0] == 0) continue; // Empty line
    if((line[0] == '#') || (line[0] == '/' && line[1] == '/')) continue; // It's a commented line
    if(index == 0 || index == -1) continue; // No "=" in the line, so that's an invalid line. Go to the next line.
    sub_str(line, ini_key, 0, index);
    sub_str(line, ini_value, index + 1, sizeof(line));
    if(strcmp(ini_key, "money", true) == 0) { LogText(" Loading Money ..."); DTAC_Config[money] = strval(ini_value); }
    if(strcmp(ini_key, "driveby", true) == 0) { LogText(" Loading DriveBy ..."); DTAC_Config[driveby] = strval(ini_value); }
    if(strcmp(ini_key, "spam", true) == 0) { LogText(" Loading Spam ..."); DTAC_Config[spam] = strval(ini_value); }
    if(strcmp(ini_key, "heal", true) == 0) { LogText(" Loading Heal ..."); DTAC_Config[heal] = strval(ini_value); }
    if(strcmp(ini_key, "armour", true) == 0) { LogText(" Loading Armour ..."); DTAC_Config[armour] = strval(ini_value); }
    if(strcmp(ini_key, "jetpack", true) == 0) { LogText(" Loading Jetpack ..."); DTAC_Config[jetpack] = strval(ini_value); }
    if(strcmp(ini_key, "speedhack", true) == 0) { LogText(" Loading Speedhack ..."); DTAC_Config[speed] = strval(ini_value); }
    if(strcmp(ini_key, "weapon", true) == 0) { LogText(" Loading Weapon ..."); DTAC_Config[weapon] = strval(ini_value); }
    if(strcmp(ini_key, "teleport", true) == 0) { LogText(" Loading Teleport ..."); DTAC_Config[teleport] = strval(ini_value); }
    if(strcmp(ini_key, "spawnkill", true) == 0) { LogText(" Loading Spawnkill ..."); DTAC_Config[spawnkill] = strval(ini_value); }
    if(strcmp(ini_key, "quickturn", true) == 0) { LogText(" Loading 180° - Turn ..."); DTAC_Config[quickturn] = strval(ini_value); }
    if(strcmp(ini_key, "maxwarns", true) == 0) { DTAC_Config[maxwarns] = strval(ini_value); }
    if(strcmp(ini_key, "savewarns", true) == 0) { DTAC_Config[savewarns] = strval(ini_value) == 1; }
    if(strcmp(ini_key, "protecttime", true) == 0) { DTAC_Config[spawnprotecttime] = strval(ini_value); }
    }
    fclose(configfile);
    return true;
    }

    b_560_95_1.png[/url]



    b_560_95_1.png[/url]