• Welcome to Battlezone Universe.
 

News:

Welcome to the BZU Archive dated December 24, 2009. Topics and posts are in read-only mode. Those with accounts will be able to login and browse anything the account had access granted to at the time. No changes to permissions will be made to be given access to particular content. If you have any questions, please reach out to squirrelof09/Rapazzini.

Main Menu

Spinoff: Uncle Avatar's Scriptor, C++ and Python Time...

Started by General BlackDragon, April 23, 2008, 06:03:45 PM

Previous topic - Next topic

OvermindDL1

That is psuedo-code in that linked url, not real code. :P
Besides boost's foreach works perfect for anything that implements the iterator interface or can be cast to the iterator interface (like a basic C-style array).

Generated by OvermindDL1's Signature Auto-Add Script via GreaseMonkey


Nielk1

The code from that link compiles though? And it even loops right!

It is looping now, but somewhere I flubbed up. Either it doesn't load right, or it doest save right, because I end up with junk data. With that junk data the timers are some huge numbers and even if you wait for the whole count down the handle and animation names are trashed too.

EDIT:
Well, the for each loops looped, but they didn't increment correctly. Strangest thing.
I noticed cause the data was all identical when I started probing for memory addresses.

It works, time for final packaging and testing...

EDIT2: Since it can save and load in single player correctly with all values in tact, it should work in MP.
Now I have the files here: http://www.bzcomplex.com/forum/viewtopic.php?f=21&t=75

Click on the image...

OvermindDL1

Does not compile for me, it has no clue what the each identifier is, nothing in scope.

In your InstantMission constructor the gameTPS is not filled out yet, you will be giving the class junk data (well, maybe ten or zero most likely, depending on whether it is preset or not...).  You should set it in the initial setup function (the one that is only called once at start), and if you do not serialize it inside your class then reset it in postload as well.

Generated by OvermindDL1's Signature Auto-Add Script via GreaseMonkey


Nielk1

The Constructor for my class sets its internal TPS and saves it too, what the class it is attached to does is no matter as long as they call the shareTPS function where I note so in my instructions.

Click on the image...

OvermindDL1

You should look for where that gameTPS variable is being set, make sure you are calling your set function *after* that point, specifically, if they call it in the constructor, make sure they call it *after* the "EnableHighTPS(m_GameTPS);" call.  If that call occurs elsewhere (it may not always be in the constructor) then make sure it is called right after whenever that takes place.

Generated by OvermindDL1's Signature Auto-Add Script via GreaseMonkey


Nielk1

That's A good point. I will make that amendum to the instructions. Where I have it being placed now the default DLL can use it.

Click on the image...