Author Topic: Bug in fj_are_struct  (Read 111 times)

Offline DavidW

  • Planewalker
  • *****
  • Posts: 282
Bug in fj_are_struct
« on: November 25, 2019, 04:20:54 PM »
If you use the fj_are_struct function to add a container, the item index is set to zero, even if there are other containers with items in.

The fj_are_struct function is complicated enough that I won't offer a direct fix. I'm using this function to fix it after adding a container:

Code: [Select]
DEFINE_PATCH_FUNCTION fix_are_container_index BEGIN
    GET_OFFSET_ARRAY cont_arr ARE_V10_CONTAINERS
    item_ind=0
    PHP_EACH cont_arr AS ind=>offset BEGIN
       WRITE_LONG (0x40 + offset) item_ind
       item_ind += LONG_AT (0x44 + offset)
    END
END

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: