DMSYSTEM error
#1

Hello I was making a DM system. The code is this:-
PHP код:
YCMD:checkdeath(playeridparams[], help) {
    if(
help) {
        
SendClientMessage(playeridX11_YELLOW_2"USAGE: /checkdeath playerid");
        return 
1;
    }
    new 
victim;
    new 
potcokemethmatsamatsbmatscmatsdmatAPacksmatBPacksmatCPacksmatDPacksmsg[128];
    if(!
sscanf(playerid,params"k<playerLookup_acc>"victim)) {        <<<<<<< LINE 119
        
if(!IsPlayerConnectEx(victim)) {
            
SendClientMessage(playeridX11_TOMATO_2 ,"User not found.");
            return 
1;
        }
    new 
Victim;
    new 
potcokemethmatsamatsbmatscmatsdmatAPacksmatBPacksmatCPacksmatDPacksmsg[128];
    if(!
sscanf(playerid,params"k<playerLookup_acc>"Victim)) {             <<<<<< LINE 174
        
if(!IsPlayerConnectEx(Victim)) {
            
SendClientMessage(playeridX11_TOMATO_2 ,"User not found.");
            return 
1;
        }
        if(
DMRefund[Victim][CharID] != GetPVarInt(Victim"CharID")) {
            
SendClientMessage(playeridX11_TOMATO_2"User Character ID does not match refund information!");
            
resetRefundEnums(Victim);
            return 
1;
        } else {
            new 
health;
            
GetPlayerHealth(Victimhealth);              <<<<<<<<<<<< LINE 193
            
if(health <= 40) {
                
SendClientMessage(playeridX11_TOMATO_2"As a safety measure, Victim HP has been set too: 98.0");
                
SetPlayerHealthEx(Victim98);
            } 
These are the errors:-
PHP код:
rp\DMSYSTEM.pwn(119) : error 035argument type mismatch (argument 1)
rp\DMSYSTEM.pwn(174) : error 035argument type mismatch (argument 1)
rp\DMSYSTEM.pwn(193) : warning 213tag mismatch 
kindly tell me how to fix it.
Reply
#2

Hello!

PHP код:
if(!sscanf(playerid,params"k<playerLookup_acc>"victim)) { 
to
PHP код:
if(!sscanf(params"k<playerLookup_acc>"victim)) { 
and
PHP код:
if(!sscanf(playerid,params"k<playerLookup_acc>"Victim)) { 
to
PHP код:
if(!sscanf(params"k<playerLookup_acc>"Victim)) { 
and
PHP код:
new health
GetPlayerHealth(Victimhealth); 
to
PHP код:
new Float:health
GetPlayerHealth(Victimhealth); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)