The Usecode Compiler does not check that UI_get_cont_items is being used to check the PARTY:
UI_get_cont_items(PARTY, SHAPE_BODY_400, QUALITY_ANY, FRAME_ANY);
The result will always be zero, because this is not supported. It never appears in SI+SS, so the compiler or engine is being faithful to the original Origin-intended model for the function.
All of the other UI functions that add, remove, or count if the PARTY has a given shape work with searching the PARTY. It seems to be just this one UI that does not.
Would it be possible to have UCC check for and warn on this illegal use?
This is something I have interest in doing for quite a while; namely. making UCC understand intrinsics and warn/give errors when they are misused. However, at present UCC only understands what intrinsics are allowed on each game, and that they take parameters and may return a value.
Hence, doing this will require major changes to how UCC handles intrinsics. Moving this to feature requests.
Ticket moved from /p/exult/bugs/2032/
Thanks for keeping this as a FR. To work around the UI limitation, I wrote a new Usecode function, posted here: http://exult.sourceforge.net/forum/read.php?f=1&i=1725196&t=1725196
**UI_move_object ** got me today, since I wasn't using brackets around the coordinates. Since a Usecode lexer would have helped prevent this, I scratched the surface of writing one in Notepad++'s XML format. It does both autocompletion and tooltip text.
That may be a more forward-facing solution than making major changes to UCC.