Solved A function to change the candamage types of an entity

Question that is answered or resolved.

16-bit Fighter

Active member
I've tried to make a function to change the candamage types of an entity but OB shuts down when the function runs.

The function:
Code:
void candamage (void d1, void d2, void d3, void d4) // ajout
{ // changes the types the identity can damage
void self = getlocalvar("self");
changeentityproperty(self, "candamage", d1, d2, d3, d4);
}

How I put it on a char's line:
Code:
@cmd    candamage "player" "npc" "enemy" "obstacle"

What the log says:
'player' is not supported by 'candamage'.

Available properties:

ground
type_enemy
type_npc
type_obstacle
type_player
type_shot
rise
riseattack
riseattack_stall
centerx
centery
file
offsetx
offsety
sprite
jumpx
jumpy
land
movez
speed

You must pass one or more string constants for candamage entity type.
Script function 'changeentityproperty' returned an exception, check the manual for details.
parameters: #140588920, 33, "player", "npc", "enemy", "obstacle",
********** An Error Occurred **********
* Shutting Down *

There's an exception while executing script 'dynamite' data/chars/matl/dynamite/dynamite.txtTotal Ram: 8276971520 Bytes
Free Ram: 3644411904 Bytes
Used Ram: 64417792 Bytes

Do you have an idea about where is the exception?
 
Back
Top Bottom