error 029: invalid expression, assumed zero - 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: error 029: invalid expression, assumed zero (
/showthread.php?tid=454448)
error 029: invalid expression, assumed zero -
nrg700 - 29.07.2013
Someone Can Fix This Error?
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
CMD:kill(playerid, params[])// the cmd is /kill
{
SetPlayerHealth(playerid, 0.0); // set player health to 0/die
SendClientMessage(playerid, RED, "You just killed yourself"); // send player message
return 1;
}
Re: error 029: invalid expression, assumed zero -
CrazyChoco - 29.07.2013
Use the command outside of any callbacks.
Re : error 029: invalid expression, assumed zero -
AmirRFCNR - 29.07.2013
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
CMD:kill(playerid, params[])// the cmd is /kill
{
SetPlayerHealth(playerid, 0); // set player health to 0/die
SendClientMessage(playerid, RED, "You just killed yourself"); // send player message
return 1;
}
}
try this
Re: error 029: invalid expression, assumed zero -
MP2 - 29.07.2013
I know you're trying to help, and that's great and all, but if you have no clue what you're doing, who are you actually helping? Not this guy. He will try that and it will still not work - wasting both his time AND yours.
Learn before teaching.
Oh and to add to that, the solution has already been posted!
Re: error 029: invalid expression, assumed zero -
jamesbond007 - 29.07.2013
CMD:kill(playerid, params[])// the cmd is /kill
{
SetPlayerHealth(playerid, 0.0); // set player health to 0/die
SendClientMessage(playerid, RED, "You just killed yourself"); // send player message
return 1;
}
Re: error 029: invalid expression, assumed zero -
MP2 - 29.07.2013
Quote:
Originally Posted by jamesbond007
CMD:kill(playerid, params[])// the cmd is /kill
{
SetPlayerHealth(playerid, 0.0); // set player health to 0/die
SendClientMessage(playerid, RED, "You just killed yourself"); // send player message
return 1;
}
|
He already has the code - why are you just copying it and pasting it? He needs to put the code outside of all callbacks. He's been told that. Solution found - topic ended.
P.S. [ pawn ] tags and indentation pls thx