Author Topic: Bug in fj_are_struct  (Read 835 times)

Offline DavidW

  • Planewalker
  • *****
  • Posts: 316
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

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: Bug in fj_are_struct
« Reply #1 on: December 18, 2019, 09:51:06 AM »
Fixed.

 

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.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

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)?: