FORUM HOME > TNM > Help
FCA Cubed Matches

trellianPosted on 08/28/03 at 11:55:33

Does the FCA CUbed Matches plugin function properly on TNMSE? It seems to me that not all matches will work. I receive an "subscript out of range" message when I try to run some matches, but some matches work as they should.

Oliver CoppPosted on 08/30/03 at 08:30:51

I would like to assist you with this but since FCA Cubed is a program by a third party, I don't have the source code.

All plugins that have been implemented following the specification guidelines will and do work properly with TNM 7 SE.

If, however, a plugin makes assumptions in any way, shape or form, it's bound to not run properly.

As an example, in TNM 7 FE, the 57th field of a wrestler record was a bit field consisting of 37 attributes coded into 37 bits of the field.

The proper way to isolate any single flag was to use the bit() function.

However, if you cut corners and isolated the 37th attribute by dividing the field by 2
36, you got the correct value as well.

Yet, this piece of code would only have worked as long as no new attributes were added to the record. If a 38th one was added, the division done above would have returned both the values of the 37th and 38th attribute - which is a processing error.

I'm suspecting a similar thing with FCA Cubed.
Critic_of_the_DawnPosted on 08/30/03 at 09:02:30

<Blank stare.>

Now my brain hurts again...

Eric "Critic of the Dawn"
Oliver CoppPosted on 08/30/03 at 09:34:46

OK, simple example.

Imagine you have two flags for a wrestler: "smokes" and "sucks" which you want to code into a single number.

Imagine you want to code these two flags into a byte (8 digits of 0 [no] or 1 [yes]).

Since both "smokes" and "sucks" are binary attributes, i.e. they can only take one of two values (yes or no), you can code them into a bit with "0" meaning "no" and "1" meaning yes.

Essentially, a byte looks like this:

XXXXXXXX

If the wrestler sucked and smoked, it would look like this if there are only two flags:

00000011

If he smoked but didn't suck, the byte would look like this:

00000010

Now, if there are only these two attributes and you want to find out if the wrestler smokes, you can either just look at the second number from the right... OR you can cut off the rightmost number.

Both times, the result will be 1: your wrestler smokes.

The shortcut will work fine UNTIL a third attribute is added: "plays cards".

In the case of the APA, their bitfield would then look like this:

00000110

i.e., "plays cards" and "smokes" but doesn't suck.

If you programmed your plugin to just look at the "smokes" digit, it'll still work as desired because it doesn't make assumptions regarding the previously unused portion of the bitfield.

However, the shortcut will all of a sudden return
"0000011" which means 3 in the decimal system.

The desired result of 1 changed to 3 because an assumption was made. If the programmer then used the result of this operation as an index into an array, he'd get a "subscript out of range" error if the array was only set up to handle indexes of 0 and 1 (which normally would be sufficient).

Does your brain feel better now :-)?
Critic_of_the_DawnPosted on 08/30/03 at 22:34:15

My brain feels better now, yes.  But now I'm irritated because somebody broke into my apartment.  Didn't take anything, but they did go to the bathroom on one of my kitchen chairs...

So, like... whoever did that is quite likely to be a 00000001 at the very least.

I think it can be safely assumed that people who go to the bathroom on other people's property can be considered to suck, yes?

I'm pretty sure Bradshaw did that in Tiger Ali Singh's turban at one point...  So wouldn't that technically make the APA 00000111?

Or does Ron Simmons being a decent guy invoke another special flag somewhere?

Eric "Critic of the Dawn"
trellianPosted on 08/31/03 at 15:27:16

Well, I didn't understand much, but I am content to use those CUbed matches that does work, even though that means I have to use a Bra & Panties Mud Match instead of a Lingerie Pillow Fight.

Bummer  :P