Problem
#1

Hey i have a problem with my command , it's not the first time when i make this command but this time i get 1 error , i tryed to figure out what the problem is but didn't succeded .

Код:
COMMAND:myhealth(playerid, params[ ] ){
    new mhealth[128], newhealth = strval(mhealth);
    if (( newhealth < 0) || ( newhealth > 101) || IsInvalidHealth( newhealth)){
    SendClientMessage(playerid, COLOR_RED, "Ai depasit limita de viata !");
    return 1;}
    if(sscanf(params,"d", mhealth)) return SendClientMessage(playerid,COLOR_WHITE,"Folosire: /myhealth <1-100>");
    SetPlayerHealth(playerid,mhealth);
    return 1;}
The problem is at this line

Код:
SetPlayerHealth(playerid,mhealth);
And i get this error
Код:
......DU.pwn(1614) : error 035: argument type mismatch (argument 2)
Reply
#2

You've setted mhealth as a string.
Delete the [128].

This forum requires that you wait 60 seconds between posts. Please try again in 5 seconds.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)