Page 2 of 2 First 12
  1. #11
    Kelrugem's Avatar
    Join Date
    Sep 2018
    Location
    Geneva, Switzerland, and Lyon, France
    Posts
    716
    Quote Originally Posted by Kelrugem View Post
    Okay, I got that working with picking loadorder of 39 (for a loadorder of 5 I couldn't assure that my extension is loaded after some other extension for some reason; am I right that extensions without any loadorder are loaded first (in random order but before extensions with defined loadorder) or do they get a random loadorder in the range/interval of the number of loaded extensions?).

    I then wanted to use this function here https://www.fantasygrounds.com/refdo...#getExtensions, but
    Code:
    Extension.getExtensions();
    just results into an error
    Code:
    Script Error: [string "scripts/manager_action_attack.lua"]:24: attempt to index global 'Extension' (a nil value)
    Am I using this function somehow wrong? When I understood it correctly then one has to add the name (here "Extension") of the package in front of the function name, so I wonder what my mistake here is
    I solved my issue

    The trick was that the other extension (here the mirror image handler of darrenan for PF1) has a unique lua script with its own name, "MirrorImageHandler". Then with
    Code:
    if MirrorImageHandler then
       [merged code]
    end
    I was able to make my extension compatible with this extension (my loadorder is now put to 20, so I decreased it a bit again after your discussion here, Trenloe and LordEntrails, thanks ).

    Oh man, would I have known this some months ago this could have simplified my coding a bit when it is about compatibility issues I may change this now with my existing packages but I am not sure since the users of my extensions are now used to the previous way and I am not sure how to communicate the change such that everyone knows about that

    Thanks again all
    Last edited by Kelrugem; October 7th, 2019 at 20:01.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in