Page 1 of 1
Odd gaian Cannon item struct
Posted: Sat Jun 27, 2009 12:07 am
by alterecco
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."
.]
Posted: Sat Jun 27, 2009 12:22 am
by Atarlost
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.
Posted: Sat Jun 27, 2009 12:14 pm
by Prophet
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.
Posted: Mon Jun 29, 2009 1:17 am
by Aury
So exactly what causes this error?

Posted: Mon Jun 29, 2009 6:03 pm
by alterecco
Wolfy wrote:So exactly what causes this error?

That is exactly what is unknown

Posted: Tue Jun 30, 2009 2:46 am
by george moromisato
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!