error 029: invalid expression, assumed zero
#1

(17244) : error 010: invalid function or declaration
(17253) : error 029: invalid expression, assumed zero
(17266) : error 010: invalid function or declaration

there's is code
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    new
        Float: health,
        Float:armour
    ;
    GetPlayerHealth(playerid, health); // Gets the health of the player that took damage, and stores it in the float "health".
    GetPlayerArmour(playerid, armour); // Gets the armour of the player that took damage, and stores it in the float "armour".

	switch(bodypart)
	{
  	case 3: SetPlayerHealth(playerid, health - 30); // Torso.
  	case 4: SetPlayerHealth(playerid, health - 20); // Groin.
  	case 5: SetPlayerHealth(playerid, health - 5);  // Left Arm.
  	case 6: SetPlayerHealth(playerid, health - 10); // Right Arm.
  	case 7: SetPlayerHealth(playerid, health - 7);  // Left Leg.
  	case 8: SetPlayerHealth(playerid, health - 12); // Right Leg.
  	case 9: SetPlayerHealth(playerid, health - 50); // Head.
	}
	return 1;
 	}

public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
the Public onplayergivedamage it's last error
Reply
#2

need help, please
Reply
#3

Show the exact lines of error in order to be helped.
Reply
#4

Quote:
Originally Posted by Jing_Chan
Посмотреть сообщение
Show the exact lines of error in order to be helped.
Reply
#5

Quote:
Originally Posted by VGAassassin
Посмотреть сообщение
The code you've provided in this is different to the first post, can you provide me the code which is causing the errors?
Reply
#6

Quote:
Originally Posted by Jing_Chan
Посмотреть сообщение
The code you've provided in this is different to the first post, can you provide me the code which is causing the errors?
Reply
#7

did you made it like this?
PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloatamountweaponidbodypart)
{
return 
1;

or not?
Reply
#8

Quote:
Originally Posted by TadePoleMG
Посмотреть сообщение
did you made it like this?
PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloatamountweaponidbodypart)
{
return 
1;

or not?
yes i make it
Reply
#9

provide me full error codes with error lines.
Reply
#10

remove } after Float:armour and put ;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)