Max accums and globalaccums.


(Flippy) #1

Does anyone know the definate maximum number of accums and globalaccums you can use in the script?

While searching around I came across a few different answer and nobody seemed to be absolutely sure… Is there any definative answer for this or is it simply a vague ‘max’ ? :stuck_out_tongue:


(S14Y3R) #2

Local accums(8 maximum) are totally individual for each entity, eg. stor_crane accum 3 set -5 doesn’t affect train2’s accum 3 set 0

//globalaccums are relevant throughout. 10 globalaccums max * 10bits

It depends how you use them, like if accum 3 inc 1 is set up for counting/tracking, then the bitset/reset of accum 3 can’t be used.
// 8 Local accums max * 10bitset/reset
// 10 globalaccums max * 10bits
// with 10 bits available for each accum,is 180 total, but each entity can have 8 local, so it can add up(and get confusing).

afaik 8)


(FireFly) #3

AFAIK you can only have 9 globalaccums ( ranging from 0 to 8 )?
http://www.splashdamage.com/forums/viewtopic.php?p=84557&highlight=#84557


(Flippy) #4

At the moment I’m just interested in the accum index, not the bit index. :slight_smile:

I knew normal accums are local, but still need to know the max :stuck_out_tongue:

So globalaccum 10 is ‘out of reach’ and accum 8 is ‘out of reach’ so to speak… I don’t like the ‘afaik’ at the end though ^^ But you seem pretty confident :stuck_out_tongue: I just want to be pretty sure about it…

Reason for asking is that I’m making a accum lister in my ETScript program which lists all globalaccums used and all accums used in a scriptblock. Would be handy to know the max number, to also notify the user of that :wink:

Thanks!

EDIT
Just read firefly’s post.
So, the possible globalaccums are definately 0 To 8 (including 8) and the possible accums are (probably) 0 To 7 (including 7)?


(FireFly) #5

mmm… that’s weird,
On chruker website (chruker=my favorite code monkey) it says:

The accum registers are buffers for 32 bit integer values.
Each scriptblock has its own private set of 10 registers, numbered 0-9. These are accessed via the accum command.
All scriptblocks shares a single set of 10 registers, numbered 0-9. These are accessed via the globalaccum command.

So you would be able to have 10 ( 0 to 9) accums & globalaccums, However when using 9 or higher you will get an error saying to use only 0 to 8?

:?

Chrucker’s site:http://games.chruker.dk/enemy_territory/scripting_reference.php#accum_registers


(SCDS_reyalP) #6

Correct.

I know we fixed this in etpro. Not sure if the other mods did or not. If etpub/jaymod/noquarter all have, then it’s probably safe to use as very few people run etmain servers.

these threads describe the bugs:
http://www.splashdamage.com/forums/viewtopic.php?t=13848
http://www.splashdamage.com/forums/viewtopic.php?t=14841