zu viele error´s

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
  • Hallo,
    Hier die Zeilen:
    if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid,ORANGE, "BENUTZUNG: (/a)dmin [admin chat]");
    return 1;
    }
    format(string, sizeof(string), "*%d Admin %s: %s", PlayerInfo[playerid][pAdmin], sendername, result);
    if (PlayerInfo[playerid][pAdmin] >= 1)
    {
    SendAdminMessage(COLOR_ORANGE, string);
    }
    printf("Admin %s: %s", sendername, result);
    }
    else
    {
    SendClientMessage(playerid,ROT,"Du bist kein Admin!");
    }
    return 1;
    }


    Die Error´s
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(658) : error 017: undefined symbol "cmd"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(662) : error 017: undefined symbol "sendername"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(662) : error 017: undefined symbol "sendername"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(662) : error 029: invalid expression, assumed zero
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(662) : fatal error 107: too many error messages on one line


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



    5 Errors.


    PS: es soll den /a chat zeigen. (Admin chat) ..

  • //----------------------------------[AdminChat]-----------------------------------------------
    if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "NUTZE: (/a)dmin [admin chat]");
    return 1;
    }
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
    format(string, sizeof(string), "*%d Admin %s[%d]: %s", PlayerInfo[playerid][pAdmin], sendername, playerid, result);
    }
    else if(PlayerInfo[playerid][pSupporter] >= 1)
    {
    format(string, sizeof(string), "*%d Supporter %s[%d]: %s", PlayerInfo[playerid][pSupporter], sendername, playerid, result);
    }
    else if(PlayerInfo[playerid][pSupporter] == 6)
    {
    format(string, sizeof(string), "*%d Admin %s[%d]: %s", PlayerInfo[playerid][pSupporter], sendername, playerid, result);
    }


    else return 1;
    for(new i=0; i<GetMaxPlayers(); i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerInfo[i][pSupporter] >= 1 || PlayerInfo[i][pAdmin] >= 1)
    {
    SendClientMessage(i,COLOR_YELLOW,string);
    }
    }
    }
    Log("OA-Chat.txt",string);
    }
    return 1;
    }


    Bitte sehr :D Soltte eingtlich funken

  • C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(659) : error 017: undefined symbol "cmd"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(663) : error 017: undefined symbol "sendername"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(663) : error 017: undefined symbol "sendername"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(663) : error 029: invalid expression, assumed zero
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(663) : fatal error 107: too many error messages on one line


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



    5 Errors.

    ..
    Liegt es daran das Ich es nicht Definiert habe?
    ..
    Wo Definiere ich das Den? ...
    Sry, bin noch nen Noob..


  • C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(659) : error 017: undefined symbol "cmd"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(663) : error 017: undefined symbol "sendername"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(663) : error 017: undefined symbol "sendername"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(663) : error 029: invalid expression, assumed zero
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(663) : fatal error 107: too many error messages on one line


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


    5 Errors.


    ..
    Liegt es daran das Ich es nicht Definiert habe?
    ..
    Wo Definiere ich das Den? ...
    Sry, bin noch nen Noob..


    Ganz oben :D
    :) ist am besten

  • if(strcmp(cmdtext, "/admin", true) == 0 || strcmp(cmdtext, "/a", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "NUTZE: (/a)dmin [admin chat]");
    return 1;
    }
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
    format(string, sizeof(string), "*%d Admin %s[%d]: %s", PlayerInfo[playerid][pAdmin], sendername, playerid, result);
    }
    else if(PlayerInfo[playerid][pSupporter] >= 1)
    {
    format(string, sizeof(string), "*%d Supporter %s[%d]: %s", PlayerInfo[playerid][pSupporter], sendername, playerid, result);
    }
    else if(PlayerInfo[playerid][pSupporter] == 6)
    {
    format(string, sizeof(string), "*%d Admin %s[%d]: %s", PlayerInfo[playerid][pSupporter], sendername, playerid, result);
    }


    else return 1;
    for(new i=0; i<GetMaxPlayers(); i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerInfo[i][pSupporter] >= 1 || PlayerInfo[i][pAdmin] >= 1)
    {
    SendClientMessage(i,COLOR_YELLOW,string);
    }
    }
    }
    Log("OA-Chat.txt",string);
    }
    return 1;
    }
    so sollte das klappen :thumbup:

  • C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(663) : error 017: undefined symbol "cmd"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(669) : error 017: undefined symbol "idx"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(671) : error 017: undefined symbol "idx"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(671) : warning 215: expression has no effect
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(673) : error 017: undefined symbol "idx"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(675) : error 017: undefined symbol "idx"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(677) : error 017: undefined symbol "idx"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(678) : error 017: undefined symbol "idx"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(678) : warning 215: expression has no effect
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(680) : error 017: undefined symbol "idx"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(683) : error 017: undefined symbol "COLOR_GRAD2"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(686) : error 017: undefined symbol "PlayerInfo"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(686) : warning 215: expression has no effect
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(686) : error 001: expected token: ";", but found "]"
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(686) : error 029: invalid expression, assumed zero
    C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\first.pwn(686) : fatal error 107: too many error messages on one line


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



    13 Errors.


    :o