/d-chat Problem

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 guten Tag,



    Ich kriege 4 errors wenn ich compile könntet ihr mir dabei vielleicht pls helfen?!



    Hier ist der Code:



    if(strcmp(cmdtext,"/d",true,2) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    GetPlayerName(playerid, sendername, sizeof (sendername));//<-------------hier soll der FEHLER sein!
    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))
    {
    new string[128],string2[128],string3[128],string4[128], name[24];
    GetPlayerName(playerid,name,sizeof name);
    if(PlayerInfo[playerid][pRank] == 6) format(string,sizeof string,"Chief %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Captain %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Lieutnant %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Seargent %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Officer %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Cadet %s: %s,over",name,cmdtext[3]);
    else
    {
    format(string, sizeof string, "** Officer %s: %s, over. **", name, cmdtext[3]);
    }
    SendTeamMessage(2, COLOR_LSPDCHAT, string);
    SendTeamMessage(1, COLOR_LSPDCHAT, string);
    printf("%s", string);
    return 1;
    }
    format(string2,sizeof string2,"Director %s: %s,over**",name,cmdtext[3]);
    format(string2,sizeof string2,"Assistan Director in Charge %s: %s,over",name,cmdtext[3]);
    format(string2,sizeof string2,"Special Agent in Charge %s: %s,over",name,cmdtext[3]);
    format(string2,sizeof string2,"Special Agent %s: %s,over",name,cmdtext[3]);
    format(string2,sizeof string2,"Special Agent Trainee %s: %s,over",name,cmdtext[3]);
    format(string2,sizeof string2,"Professional Staff %s: %s,over",name,cmdtext[3]);
    else
    {
    format(string2, sizeof string2, "** Intern %s: %s, over. **", name, cmdtext[3]);
    }
    SendTeamMessage(2, COLOR_LSPDCHAT, string);
    SendTeamMessage(1, COLOR_LSPDCHAT, string);
    printf("%s", string);
    return 1;
    }
    format(string3,sizeof string3,"General %s: %s,over",name,cmdtext[3]);
    format(string3,sizeof string3,"Oberstleutnant %s: %s,over",name,cmdtext[3]);
    format(string3,sizeof string3,"Hauptmann %s: %s,over",name,cmdtext[3]);
    format(string3,sizeof string3,"Leutnant %s: %s,over",name,cmdtext[3]);
    format(string3,sizeof string3,"Stabsgefreiter %s: %s,over",name,cmdtext[3]);
    format(string3,sizeof string3,"Soldat %s: %s,over",name,cmdtext[3]);
    else
    {
    format(string3, sizeof string3, "** Soldaz %s: %s, over. **", name, cmdtext[3]);
    }
    SendTeamMessage(2, COLOR_LSPDCHAT, string);
    SendTeamMessage(1, COLOR_LSPDCHAT, string);
    printf("%s", string);
    return 1;
    }
    format(string4,sizeof string4,"Arzt %s: %s,over",name,cmdtext[3]);
    format(string4,sizeof string4,"OberArzt %s: %s,over",name,cmdtext[3]);
    format(string4,sizeof string4,"Chirurg %s: %s,over",name,cmdtext[3]);
    format(string4,sizeof string4,"Krankenschwester %s: %s,over",name,cmdtext[3]);
    format(string4,sizeof string4,"Krankenfahrer %s: %s,over",name,cmdtext[3]);
    format(string4,sizeof string4,"Praktikant %s: %s,over",name,cmdtext[3]);
    else
    {
    format(string4, sizeof string4, "** Arzt %s: %s, over. **", name, cmdtext[3]);
    }
    SendTeamMessage(2, COLOR_LSPDCHAT, string);
    SendTeamMessage(1, COLOR_LSPDCHAT, string);
    printf("%s", string);
    return 1;
    }






    if(!strlen(cmdtext[2]))
    {
    SendClientMessage(playerid,COLOR_GREY,"Benutze: /d [text]");
    return 1;
    }
    if(gTeam[playerid] == TEAM_COPS|| gTeam[playerid] == TEAM_COPS)
    {
    for(new i=0 ; i <GetMaxPlayers() ; i++)
    {
    if(gTeam[i] == TEAM_COPS || gTeam[i] == TEAM_COPS)
    {
    return SendClientMessage(i,COLOR_LSPDCHAT,string);
    }
    }
    }
    if(gTeam[playerid] == TEAM_FBI|| gTeam[playerid] == TEAM_FBI)
    {
    for(new i=0 ; i <GetMaxPlayers() ; i++)
    {
    if(gTeam[i] == TEAM_FBI || gTeam[i] == TEAM_FBI)
    {
    return SendClientMessage(i,COLOR_LSPDCHAT,string2);
    }
    }
    }
    if(gTeam[playerid] == TEAM_ARMY|| gTeam[playerid] == TEAM_ARMY)
    {
    for(new i=0 ; i <GetMaxPlayers() ; i++)
    {
    if(gTeam[i] == TEAM_ARMY || gTeam[i] == TEAM_ARMY)
    {
    return SendClientMessage(i,COLOR_LSPDCHAT,string3);
    }
    }
    }
    if(gTeam[playerid] == TEAM_MEDIC|| gTeam[playerid] == TEAM_MEDIC)
    {
    for(new i=0 ; i <GetMaxPlayers() ; i++)
    {
    if(gTeam[i] == TEAM_MEDIC || gTeam[i] == TEAM_MEDIC)
    {
    return SendClientMessage(i,COLOR_LSPDCHAT,string4);
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist nicht Teil eines Teams !");
    return 1;
    }
    }
    return 1;
    }


    return 1;
    }



    und hier die Fehler:



    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1016) : warning 217: loose indentation
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1021) : warning 217: loose indentation
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1063) : warning 217: loose indentation
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1093) : warning 217: loose indentation
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1101) : warning 217: loose indentation
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1102) : warning 217: loose indentation
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1114) : warning 217: loose indentation
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1115) : warning 217: loose indentation
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1131) : warning 217: loose indentation
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1136) : warning 217: loose indentation
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1169) : warning 217: loose indentation
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1174) : error 017: undefined symbol "sendername"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1174) : error 017: undefined symbol "sendername"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1174) : error 029: invalid expression, assumed zero
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1174) : fatal error 107: too many error messages on one line
    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    4 Errors.

  • ich habs bei den news getahen aber....ich krieg jetzt 26 errors

  • die hier:





    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1179) : error 017: undefined symbol "idx"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1181) : error 017: undefined symbol "idx"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1181) : warning 215: expression has no effect
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1183) : error 017: undefined symbol "idx"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1185) : error 017: undefined symbol "idx"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1187) : error 017: undefined symbol "idx"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1188) : error 017: undefined symbol "idx"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1188) : warning 215: expression has no effect
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1190) : error 017: undefined symbol "idx"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1196) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1196) : warning 219: local variable "string2" shadows a variable at a preceding level
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1196) : warning 219: local variable "string3" shadows a variable at a preceding level
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1196) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1205) : error 029: invalid expression, assumed zero
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1209) : error 017: undefined symbol "SendTeamMessage"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1210) : error 017: undefined symbol "SendTeamMessage"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1196) : warning 204: symbol is assigned a value that is never used: "string4"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1196) : warning 204: symbol is assigned a value that is never used: "string3"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1196) : warning 204: symbol is assigned a value that is never used: "string2"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1221) : error 029: invalid expression, assumed zero
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1225) : error 017: undefined symbol "SendTeamMessage"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1226) : error 017: undefined symbol "SendTeamMessage"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1237) : error 029: invalid expression, assumed zero
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1241) : error 017: undefined symbol "SendTeamMessage"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1242) : error 017: undefined symbol "SendTeamMessage"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1247) : error 017: undefined symbol "string4"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1247) : error 017: undefined symbol "string4"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1248) : error 017: undefined symbol "string4"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1248) : error 017: undefined symbol "string4"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1249) : error 017: undefined symbol "string4"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1249) : error 017: undefined symbol "string4"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1250) : error 017: undefined symbol "string4"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1250) : error 017: undefined symbol "string4"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1251) : error 017: undefined symbol "string4"
    C:\Dokumente und Einstellungen\Nunzio Tuccio\Desktop\Spirit-Script!_1.1(1251) : error 017: undefined symbol "string4"
    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    26 Errors.





    Ich mach ein SELFMADE