Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Help with an array.
Re: Help with an array. [message #390697 is a reply to message #390692] Mon, 15 June 2009 10:03 Go to previous messageGo to previous message
jnz is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: First Map in 3D Studio Max
Next Topic: How would i go about making a hud.ini
Goto Forum:
  


Current Time: Thu Dec 19 06:15:19 MST 2024

Total time taken to generate the page: 0.00762 seconds