SA-MP Forums Archive
DMSYSTEM error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: DMSYSTEM error (/showthread.php?tid=610820)



DMSYSTEM error - xXtremeXx - 28.06.2016

Hello I was making a DM system. The code is this:-
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);
            } 
These are the errors:-
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 
kindly tell me how to fix it.


Re: DMSYSTEM error - Mencent - 28.06.2016

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(Victim, health); 
to
PHP код:
new Float:health; 
GetPlayerHealth(Victim, health);