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.