Home   Help Search Login Register  

Author Topic: Value Not an Array  (Read 835 times)

0 Members and 1 Guest are viewing this topic.

Aaron Kane

  • Guest
Value Not an Array
« on: 19 Jul 2003, 09:13:32 »
Hello

I've been searching for an answer to my very bizarre problem thats been occuring over and over for well over a year.  I used to post on the main BIS forums, but was unfortunatly unable to find an answer to my problem.

My problem is as follows...

I would really like to make some small modifications to the basic Operation Flashpoint units and weapons, such as increasing the damage of the Apache's hellfire.  I only intend to use this in single player.  

I downloaded the OFPManager utility, and decrypted the Config.bin, renamed it to Config.cpp, and made my adjustments.  I changed the default Hellfire damage variable... I dont remember what it was, but I changed it to 1200.

I saved my "work", and attempted to start the game.  The game loads fine until it gets to the main screen, where you choose if you want to use the mission editor, single player game, etc.  Once that screen appears, I'm met with the message "Value not an array"

I attempt to ignore this error, and go into the mission editor.  I place myself in the cockpit of an Apache, and place a hostile T-80 tank out in front of me, say 500 yards or so.

Then I attempt to enter the actual game... and things fall apart.  My cockpit completely disappears, and from the outside view my pilot is actually sitting BELOW the Apache (he's just in the sitting position, but isnt actually INSIDE the helicopter).  The sounds are functioning as usual.  I attempt to continue playing, and target the enemy tank.  I fire a hellfire, only to find that the tank is immune to ALL DAMAGE...  my hellfires, even though I changed them so that they should be able to destroy a T-80 in a single hit, do nothing.  The tank shrugged off all eight of them without so much as a scratch.

I was running Patch version 1.85 at this time.

So at this point I deinstalled the game, confident that I had messed up the games delicate nature.  I completely delete all files related to the game, and reinstall.  I patch the game to version 1.20, and then decrypt the config.bin and such again.  I make my changes to the config.cpp file (all I did was change Hellfire damage), and attempt to enter the game.

This time, the screen flashes black.  I'm then booted back to my desktop, and the message "Value not an array" is displayed.  

I've tried using the pre-formed config.cpp files from alonewolf, I've had friends send me their modified config.cpp files, I've tried to use a utility to make the config.cpp into cofig.bin, but to no avail.  The error continually occurs, and I cant think of a reason why.

As I said, I was not able to find my answer at the BIS forums, and sincerely hope I might find some guidance here.  

Thank you in advance.

Rubble_Maker

  • Guest
Re:Value Not an Array
« Reply #1 on: 19 Jul 2003, 12:23:34 »
I know these problems, its because all the BIn utilities out there are faulty (except the BIS official tool. but it cannot decrypt, of course). The BIN utilities generally fail to recognize certain data types and warp the information, so that some arrays become values, floats become integers, and so on. Thats why most decrypted BIN's dont work.

Now you can either

a.) Read the config.cpp carefully, and compare each and every entry with the commented config.cpp's to see if the syntax is correct. Then you should be able to get it running

or

b.) Simply derive from the existing AH-64 model, i.e. make a patch, not a whole new definition.
It'd look like this:

   class AH64: Helicopter {};
   class My_AH64A: AH64
   {
                      .......
                }

The same you'd do with the Hellfires. You only change what you want to change (which is what this whole pseudo-OOP system was intended for)

Well, whatever you do, *never* expect a decrypted BIN file to work! They're always full of errors cause the decryptor tools are all bug-infested (which is kinda depressing, I know).


Aaron Kane

  • Guest
Re:Value Not an Array
« Reply #2 on: 24 Jul 2003, 21:01:24 »
Well I finally achieved success  ;D

After so long, I finally got my changes ingame, but there is a lone bug that plagues me.

I downloaded a commented config.bin for version 1.46 (My Resistance disk is apparently scratched and wont read a certain file upon installation :( )  And made the adjustments to Hellfires.  Sure enough, the damage was increased to be enough to cripple or destroy a T-80 with a single hit.

However, the bug that is ingame now pretty much ruins my fun...  I am unable to enter helicopters.  I am still able to enter the Jeep (The only other vehicle I tested with), but when I exit, it shows the animation for someone climbing into a vehicle.

When I do try to enter another vehicle, it sucks me up to the vehicle's side and wont allow me to move :\

M_S_Holder

  • Guest
Re:Value Not an Array
« Reply #3 on: 02 Sep 2003, 17:49:00 »
It has to do with the "#define" list at the start of the CPP, I think.

I know this is an old thread, BUT I TRIED FOR YEARS TO DO THIS!

Andersson sent me a config.cpp for ver. 1.90--and it works!

I don't have one for 1.85, though.