error 029: invalid expression, assumed zero
#1

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;
}
Reply
#2

Use the command outside of any callbacks.
Reply
#3

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
CMD:kill(playeridparams[])// the cmd is /kill
   
{
    
SetPlayerHealth(playerid0);    // set player health to 0/die
    
SendClientMessage(playeridRED"You just killed yourself");    // send player message
    
return 1;
   }

try this
Reply
#4

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!
Reply
#5

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;
}
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)