Re: Help with an array. [message #390697 is a reply to message #390692] |
Mon, 15 June 2009 10:03 |
|
jnz
Messages: 3396 Registered: July 2006 Location: 30th century
Karma:
|
General (3 Stars) |
|
|
2 things I can see here:
First, you need to declare 'damageObject' inside of the script if you want the object that the script is attached to to track player attacking it.
Also:
GameObject *mainobj = Get_GameObj(damageObject[i]);
VetUpdate(damageObject[i], (int)GetPoints(Commands->Get_Preset_Name(obj)), (int)Commands->Get_Points(mainobj));
You need to check mainobj before you use it. If Get_GameObj returns 0, it will crash.
EDIT: third, VetUpdate parameter 1 isn't a GameObj *, it is an int. Probably player ID. Use VetUpdate(Get_PlayerID(damageObject[i]), ...
[Updated on: Mon, 15 June 2009 10:05] Report message to a moderator
|
|
|