errors - inconsistent return types (array & non-array)

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
  • Problem:

    Spoiler anzeigen
    Hallo,
    wenn ich in meinem script die include

    #include <SIF>

    reinmache kriege ich die Fehler:

    \Samp Server\pawno\include\YSI\y_utils.inc(420) : error 021: symbol already defined: "GetIP"
    \Samp Server\pawno\include\YSI\y_utils.inc(433) : error 079: inconsistent return types (array & non-array)
    (22549) : error 025: function heading differs from prototype
    (22549) : error 025: function heading differs from prototype
    (60371) : error 035: argument type mismatch (argument 2)

    Und hier die Zeilen

    //include y_utils.inc
    stock GetIP(playerid)
    { //(420) : error 021: symbol already defined: "GetIP"
    new
    ip[16];
    GetPlayerIp(playerid, ip, sizeof (ip));
    new
    ipv = strval(ip) << 24,
    pos = 0;
    while (pos < 15 && ip[pos++] != '.') {}
    ipv += strval(ip[pos]) << 16;
    while (pos < 15 && ip[pos++] != '.') {}
    ipv += strval(ip[pos]) << 8;
    while (pos < 15 && ip[pos++] != '.') {}
    ipv += strval(ip[pos]);
    return ipv; //(433) : error 079: inconsistent return types (array & non-array)
    }
    //Gamemode
    #define Function%0(%1) forward%0(%1); public%0(%1) //so hab ich es definiert
    Function OnPlayerLogin(playerid,password[]) //(22549) : error 025: function heading differs from prototype
    {
    ....
    }
    OnPlayerLogin(playerid,inputtext); //(60371) : error 035: argument type mismatch (argument 2)

    Hab die Lösung:
    hab einfach die stock Funktion gelöscht aus y_utils.inc
    und bei Function OnPlayerLogin(playerid,password[]) hab ich einfach password zu passwort geändert



    //edit1 - bessere übersicht
    //edit2 - Lösung

    76561198158212580.png

    Einmal editiert, zuletzt von theTV () aus folgendem Grund: //edit1 - bessere übersicht //edit2 - Lösung