Odd gaian Cannon item struct

These are old bug reports that have been closed.
Locked
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

The gaian demolition cannon seems to behave oddly when it is placed on a ship. If you do a (objGetItems gPlayerShip "*") it will return a list where the gaian is represented as "(134480194 -16777215 8 0 0" (without the ending parenthesis)

To demonstrate:

Code: Select all

(setq adder (lambda Nil
    (objAddItem gPlayerShip (itmCreate 0x08040142 1))
))

(setq printer (lambda Nil
    (enum (objGetItems gPlayerShip "*") itm (block Nil
        (dbgOutput "Item Struct: " itm)
        (dbgOutput "Item Name: " (itmGetName itm 1))
    ))
))
Run (adder) and the (printer) and you will get a list, ending with the gaian and that strange item struct.

It's a bit of a problem, since it causes code to crash with: "Mismatched open parenthesis."

.]
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

There are other things that cause the same crash in mods, but the Gaian Demolition Cannon is the only one identified so far in vanilla Transcendance.
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

I threw together a little script and found some more.

this is what I used:

Code: Select all

(setq checking (lambda Nil
    (block Nil
        (itmEnumTypes "*" theItem
            (block Nil
                (dbgLog (itmGetName theItem 1))
                (dbgLog "Item Structure: "theItem)
                (dbgLog "------------------")
                )
            )
    )
))
These are the other items.

DM600 missile rack
Item Structure: (16580 -16777215 16 0 0

DM1500 missile rack
Item Structure: (16785 -16777215 16 0 0

Gaian demolition cannon
Item Structure: (134480194 -16777215 8 0 0

Vial of thioseptal
Item Structure: (134349061 -16777215 12 0 0

Korolov shipping container
Item Structure: (1392643 -16777215 5000 0 0

Blue cash card
Item Structure: (16624 -16777215 55 0 0

Gold cash card
Item Structure: (16625 -16777215 68 0 0

Platinum cash card
(16626 -16777215 52 0 0


(I wouldn't reccomend others using dbgLog to output this much. I thought the game had crashed but, in fact, dbgLog eats alot of system resources.)

That seems to be all of them. Hope this helps.
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

So exactly what causes this error? :?
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Wolfy wrote:So exactly what causes this error? :?
That is exactly what is unknown :P
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Definitely a bug.

Internally, items are represented in a binary structure. When converting that to a script representation, I encode the binary structure in a string. Unfortunately, the print routines try to output the string as a binary representation and get confused.

In the next version I've fixed it so that the print routines convert the binary representation to escape-code sequences.

Thanks for the report!
Locked