03.05.2011, 15:11
I managed to reduce the numebr of errors in /heal command but still need help ,please take a look:
Errors:
HELP ME FAST!!!
pawn Код:
if (strcmp("/heal", cmdtext, true, 5) == 0)
{
new gTeam1[MAX_PLAYERS];
if(gTeam1[playerid] == TEAM_MEDICS)
{
if(IsPlayerConnected(playerid))
{
new tmp[128];
tmp = strtok(cmdtext);
if(!strlen(tmp))
{
SendClientMessage(playerid,RED,"USAGE: /heal [playerid]");
return 1;
}
new player1;
player1 = ReturnUser(tmp);
tmp = strtok(cmdtext);
if(IsPlayerConnected(player1))
{
if(player1 != INVALID_PLAYER_ID)
{
SetPlayerHealth(player1,100);
GivePlayerMoney(playerid,300);
GivePlayerMoney(playerid,-300);
GetPlayerName(player1,pn1,sizeof(pn1));
GetPlayerName(playerid,medicname,sizeof(medicname));
new string[128];
format(string,sizeof(string),"%s has been healed by medic %s.",pn1,medicname);
SendClientMessageToAll(GREEN,string);
}
}
}
}
}
return 0;
}
Код:
D:\Jocuri\GTA\GTA San Andreas\SAMP\samp03csvr_win32\gamemodes\sfrpcrdm.pwn(525) : warning 202: number of arguments does not match definition D:\Jocuri\GTA\GTA San Andreas\SAMP\samp03csvr_win32\gamemodes\sfrpcrdm.pwn(525) : error 047: array sizes do not match, or destination array is too small D:\Jocuri\GTA\GTA San Andreas\SAMP\samp03csvr_win32\gamemodes\sfrpcrdm.pwn(533) : warning 202: number of arguments does not match definition D:\Jocuri\GTA\GTA San Andreas\SAMP\samp03csvr_win32\gamemodes\sfrpcrdm.pwn(533) : error 047: array sizes do not match, or destination array is too small D:\Jocuri\GTA\GTA San Andreas\SAMP\samp03csvr_win32\gamemodes\sfrpcrdm.pwn(541) : error 017: undefined symbol "pn1" D:\Jocuri\GTA\GTA San Andreas\SAMP\samp03csvr_win32\gamemodes\sfrpcrdm.pwn(541) : error 017: undefined symbol "pn1" D:\Jocuri\GTA\GTA San Andreas\SAMP\samp03csvr_win32\gamemodes\sfrpcrdm.pwn(541) : error 029: invalid expression, assumed zero D:\Jocuri\GTA\GTA San Andreas\SAMP\samp03csvr_win32\gamemodes\sfrpcrdm.pwn(541) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.