Hi Leute!
Ich hab heute versucht strcmp in meinem script zu dcmd umzuwandeln, allerdings hab ich da wohl oder übel irgendwas dabei vergessen
Mein Compiler zeigte daraufhin aber 3 Errors und ein Warning an:
C:\Users\Arlt\Desktop\Samp Server Client\gamemodes\Tim_No1.pwn(915) : warning 203: symbol is never used: "params"
C:\Users\Arlt\Desktop\Samp Server Client\gamemodes\Tim_No1.pwn(915 -- 934) : error 010: invalid function or declaration
C:\Users\Arlt\Desktop\Samp Server Client\gamemodes\Tim_No1.pwn(915 -- 936) : error 010: invalid function or declaration
C:\Users\Arlt\Desktop\Samp Server Client\gamemodes\Tim_No1.pwn(915 -- 942) : error 010: invalid function or declaration
C:\Users\Arlt\Desktop\Samp Server Client\gamemodes\Tim_No1.pwn(915 -- 942) : 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.
Woran könnte das liegen? Kann mir jemand helfen?
Hier der falsche Teil:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(duty, 4, cmdtext);
dcmd(money, 5, cmdtext);
dcmd(disarm, 6, cmdtext);
dcmd(freitod, 7, cmdtext);
dcmd(regen, 5, cmdtext);
dcmd(hitze, 5, cmdtext);
dcmd(nebel, 5, cmdtext);
dcmd(sturm, 5, cmdtext);
dcmd(sandsturm, 9, cmdtext);
dcmd(destroycar, 10, cmdtext);
dcmd(wolken, 6, cmdtext);
dcmd(normaleswetter, 14, cmdtext);
dcmd(healme, 6, cmdtext);
return 0;
}
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
dcmd_duty(playerid, params[])
{
if(gTeam[playerid] == TEAM_COPS)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 212.5936,188.1724,1003.0313))// PD duty
{
GivePlayerWeapon(playerid, 41, 1000);
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 33, 500);
GivePlayerWeapon(playerid, 3, 1);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid, 0x0000FFFF, "Du bist nun im Dienst!");
}
else
{
SendClientMessage(playerid,0xFF0000FF,"Du bist nicht im PD!"); }
}
}
else if(gTeam[playerid] == TEAM_MEDICS)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 234.9727,109.8153,1010.2188))
{
GivePlayerWeapon(playerid, 41, 1000);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid, 0x0000FFFF, "Du bist nun im Dienst!");
}
else
{
SendClientMessage(playerid,0xFF0000FF,"Du bist nicht im Krankenhaus!");
}
}
else if(gTeam[playerid] == TEAM_FBI)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, -791.6930,493.9527,1376.1875))
{
GivePlayerWeapon(playerid, 24, 1000);
GivePlayerWeapon(playerid, 41, 1000);
GivePlayerWeapon(playerid, 34, 500);
GivePlayerWeapon(playerid, 29, 1000);
GivePlayerWeapon(playerid, 46, 1);
GivePlayerWeapon(playerid, 27, 1000);
GivePlayerWeapon(playerid, 3, 1);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid, 0x0000FFFF, "Du bist nun im Dienst!");
}
else
{
SendClientMessage(playerid,0xFF0000FF,"Du bist nicht im Federal Bureau of Investigation!");
}
}
else if(gTeam[playerid] == TEAM_ARMY)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2527.9780,-1290.1348,1031.4219))
{
GivePlayerWeapon(playerid, 41, 1000);
GivePlayerWeapon(playerid, 1, 1);
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 34, 500);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 31, 500);
GivePlayerWeapon(playerid, 25, 500);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid, 0x0000FFFF, "Du bist nun im Dienst!");
}
else
{
SendClientMessage(playerid,0xFF0000FF,"Du bist nicht am Army - Stützpunkt!");
}
}
else if(gTeam[playerid] == TEAM_REGIERUNG)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 362.4753,209.5455,1008.3828))
{
GivePlayerWeapon(playerid, 41, 1000);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid, 0x0000FFFF, "Du bist nun im Dienst!");
}
else
{
SendClientMessage(playerid,0xFF0000FF,"Du bist nicht im Rathaus!");
}
}
Danke schonmal im Vorraus!