Jump to content

Recommended Posts

Posted

Just a note to script-writers to warn you of some scripting-engine bugs introduced in 1.2.8.

 

If you use any of the following functions in your scripts, you will have problems unless special care is taken*:

 

coalition.getGroups( any_side, Groups.Category.AIRPLANE )

coalition.getGroups( any_side, Groups.Category.HELICOPTER )

coalition.getGroups( any_side, nil )

and

 

retval = coalition.addGroup( any_country_ID, Group.Category.AIRPLANE, any_group_data )

retval = coalition.addGroup( any_country_ID, Group.Category.HELICOPTER, any_group_data )

if you use retval for anything.

 

* By 'special care', I mean doing things like:

- using pcall() first and check for success.

- find an alternate method for getting groups, such as using the env.mission table. (This works for static groups created in the Mission Editor but not for dynamically spawned groups.)

- keep track of dynamically spawned groups yourself.

 

Note: There may be other bugs, as well. These are ones that I have discovered so far.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...