Problem - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem (
/showthread.php?tid=225853)
Problem -
Rock18 - 14.02.2011
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)
Re: Problem -
SkizzoTrick - 14.02.2011
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.