When I use (itmGetAverageAppearing &itTestItem;) in the debug console it returns nil. TestItem has numberAppearing set to 1d10.
When I use (itmGetAverageAppearing &itTestItem;) in an invoke, the game crashes.
When I use (itmGetAverageAppearing "&itTestItem;") in an invoke it returns nil.
I thought that an item was referenced by it's UNID as &itTestItem; in script- no quotes. Also, why wont (itmGetAverageAppearing) return anything other than nil? I have tried it a bunch of different ways in the debug and in invokes, with lots of different items- never getting a result other than nil or crashing.
(itmGetName &itTestItem;) in th debug console returns nil.
(itmGetName (itmCreate &itTestItem; 1) 1) returns nil
Doesn't that work in the debug console?
I guess not!
(itmGetName (itmCreate &itTestItem; 1) 1) works fine in the game.
(itmGetAverageAppearing (itmCreate &itTestItem; 1)) works in the invoke, but not in the console. Why does it require (itmCreate first to work?
Why doesn't an item UNID work for the item functions?
What is a "full item structure"?
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
Unfortunately, the debug console does not understand the &variable; syntax (that's just an XML 'macro expansion')
In the debug console you need to put in the hex (or decimal) value. You can also use (unvUNID {some item name}) to get the UNID of an item.
(itmGetAverageAppearing) takes something returned by (itmCreate) [It won't take an UNID]
Hope that helps!
In the debug console you need to put in the hex (or decimal) value. You can also use (unvUNID {some item name}) to get the UNID of an item.
(itmGetAverageAppearing) takes something returned by (itmCreate) [It won't take an UNID]
Hope that helps!