28.06.2016, 20:10
Hello I was making a DM system. The code is this:-
These are the errors:-
kindly tell me how to fix it.
PHP код:
YCMD:checkdeath(playerid, params[], help) {
if(help) {
SendClientMessage(playerid, X11_YELLOW_2, "USAGE: /checkdeath playerid");
return 1;
}
new victim;
new pot, coke, meth, matsa, matsb, matsc, matsd, matAPacks, matBPacks, matCPacks, matDPacks, msg[128];
if(!sscanf(playerid,params, "k<playerLookup_acc>", victim)) { <<<<<<< LINE 119
if(!IsPlayerConnectEx(victim)) {
SendClientMessage(playerid, X11_TOMATO_2 ,"User not found.");
return 1;
}
new Victim;
new pot, coke, meth, matsa, matsb, matsc, matsd, matAPacks, matBPacks, matCPacks, matDPacks, msg[128];
if(!sscanf(playerid,params, "k<playerLookup_acc>", Victim)) { <<<<<< LINE 174
if(!IsPlayerConnectEx(Victim)) {
SendClientMessage(playerid, X11_TOMATO_2 ,"User not found.");
return 1;
}
if(DMRefund[Victim][CharID] != GetPVarInt(Victim, "CharID")) {
SendClientMessage(playerid, X11_TOMATO_2, "User Character ID does not match refund information!");
resetRefundEnums(Victim);
return 1;
} else {
new health;
GetPlayerHealth(Victim, health); <<<<<<<<<<<< LINE 193
if(health <= 40) {
SendClientMessage(playerid, X11_TOMATO_2, "As a safety measure, Victim HP has been set too: 98.0");
SetPlayerHealthEx(Victim, 98);
}
PHP код:
rp\DMSYSTEM.pwn(119) : error 035: argument type mismatch (argument 1)
rp\DMSYSTEM.pwn(174) : error 035: argument type mismatch (argument 1)
rp\DMSYSTEM.pwn(193) : warning 213: tag mismatch