[solved] SobGroup_TakeDamage error

When I use this function I get an error:

SobGroup_TakeDamage("HE_Formation1", 1)

Here is the error:

luasobgroupquery 125:  SGQuery
parameter: bad argument #1 to `?' (string expected, got table)
parameter: unable to recover; exiting
Lua -- Critical error-- FATAL EXIT --luamem/95:!--stack trace--

Can someone else please verify that this function works and I am not going crazy? Thank you.

[edit]

FYI, the code I’m working on worked in hw2c. The sobgroup was created on a level using the createSOBGroup function.

[edit]

Never mind. I must be doing something wrong.

[edit]

The stupid research ships were the problem. You have to choose one of the numbered ships researchship_1, researchship_2, researchship_3 and so on.

1 Like