OCC.Chat

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 bei dem


    stock strget(strx[], pos, search = ' ') {
    new arg, ret[128], idxx;
    for (new i = 0; i < strlen(strx); i++) {
    if(strx[i] == search || i == strlen(strx) || strx[i + 1] == 10) {
    arg++;
    if (arg == pos + 1){
    ret[i-idxx] = EOS;
    return ret;
    } else if (arg == pos)
    idxx= i+1;
    }
    else if (arg == pos)
    ret[i - idxx] = strx[i];
    }
    return ret;
    }
    return ret;
    }


    Diese Errors

    Code
    C:\Users\M-M\Desktop\Games\Server\gamemodes\GnR.pwn(1470) : error 010: invalid function or declaration
    Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase
    
    
    
    
    1 Error.
  • stock strget(strx[], pos, search = ' ')
    {
    new arg, ret[128], idxx;
    for (new i = 0; i < strlen(strx); i++)
    {
    if(strx[i] == search || i == strlen(strx) || strx[i + 1] == 10)
    {
    arg++;
    if (arg == pos + 1)
    {
    ret[i-idxx] = EOS;
    return ret;
    }
    else if (arg == pos)
    {
    idxx= i+1;
    }
    else if (arg == pos)
    {
    ret[i - idxx] = strx[i];
    }
    return ret;
    }
    }
    }
    So sollte es klappen. (Hab es noch etwas verschönert, wenn man noch nicht richtig Scripten kann sollte man übersichtlicher schreiben) :rolleyes: