STAR TREK 2d20
Page 3 of 4 First 1234 Last
  1. #21
    v3 was just released a couple days ago. If you haven't seen this exstention since it first came out, check out this new video showing its current state.
    https://youtu.be/C--8jrdKLjc

  2. #22
    This extension:
    https://www.fantasygrounds.com/forum...rary-hitpoints
    Is causing this error in FGU (when an NPC damages a PC):
    Script Error: [string "scripts/manager_stats_MNM.lua"]:848: bad argument #3 to 'gsub' (string/function/table expected)

    It would be super cool if that wasn't happening. Though I understand, you can't make all your extensions compatible with every ext out there in the wild.

    One feature I wouldn't mind seeing, is an option to turn off NPC data collection. I assume that's going into dm.xml which is likely eventually going to cause some additional growth into the file... I dunno how much but I really personally don't care about the NPC stats.

    Thanks! Love this extension!

  3. #23
    Quote Originally Posted by DM_BK View Post
    This extension:
    https://www.fantasygrounds.com/forum...rary-hitpoints
    Is causing this error in FGU (when an NPC damages a PC):
    Script Error: [string "scripts/manager_stats_MNM.lua"]:848: bad argument #3 to 'gsub' (string/function/table expected)

    It would be super cool if that wasn't happening. Though I understand, you can't make all your extensions compatible with every ext out there in the wild.

    One feature I wouldn't mind seeing, is an option to turn off NPC data collection. I assume that's going into dm.xml which is likely eventually going to cause some additional growth into the file... I dunno how much but I really personally don't care about the NPC stats.

    Thanks! Love this extension!
    I don't have that other extension but am also hitting that error (thanks for identifying which of my extensions was causing it). I am wondering if this needs have a different load order value.

  4. #24
    Quote Originally Posted by Klandare View Post
    I don't have that other extension but am also hitting that error (thanks for identifying which of my extensions was causing it). I am wondering if this needs have a different load order value.
    This was not just "an extension". The code was doing a DB.getValue without providing a default - which means it would return nil if it could not find the nodePC "name", causing the third argument of the message routine to fail. Defensive programming for unknown situations and timing issues (which do happen in FGU) should be that you never depend on something coming back with a value. You can fix your own version (as I've had to rewrite it to allow my own extension to be able to take advantage of stats) by simply providing the "" 3rd argument to DB.getValue so it returns a blank instead of nil if nothing is there. You'll get a message with no name in the text but its better than blowing up on you.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  5. #25
    Quote Originally Posted by SilentRuin View Post
    This was not just "an extension". The code was doing a DB.getValue without providing a default - which means it would return nil if it could not find the nodePC "name", causing the third argument of the message routine to fail. Defensive programming for unknown situations and timing issues (which do happen in FGU) should be that you never depend on something coming back with a value. You can fix your own version (as I've had to rewrite it to allow my own extension to be able to take advantage of stats) by simply providing the "" 3rd argument to DB.getValue so it returns a blank instead of nil if nothing is there. You'll get a message with no name in the text but its better than blowing up on you.
    Which file inside the extension is the issue? And are you saying just look for the 3rd listing of DB.getValue and where it currently is likely "" then put something like " " ?

  6. #26
    Quote Originally Posted by Klandare View Post
    Which file inside the extension is the issue? And are you saying just look for the 3rd listing of DB.getValue and where it currently is likely "" then put something like " " ?
    I'm not sure what your asking here. Are you saying you don't have the log referenced earlier?

    Script Error: [string "scripts/manager_stats_MNM.lua"]:848: bad argument #3 to 'gsub' (string/function/table expected)

    I mean that is the file. That is the exact line number in the file. I admit I fixed all the missing 3rd arguements of DB.getValue for "name" in that file so that when they built their respective messages they could never blow up on me. For example...

    Code:
    	local messageText=string.gsub(DB.getValue(nodeMsg,"bestDmgMsg"),"NAME",DB.getValue(nodePC,"name", ""));
    It will not fix the issue - but I'm lazy - this will insure it does not blow up. As this error seems to only happen for me when some existing resource is missing or lost (like a module not loaded or no longer present in campaign DB).

    A cleaner fix would be to never even show/build the message if the name was not available, but like I said, I'm lazy.
    Last edited by SilentRuin; January 26th, 2021 at 17:31.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  7. #27
    Quote Originally Posted by SilentRuin View Post
    I'm not sure what your asking here. Are you saying you don't have the log referenced earlier?

    Script Error: [string "scripts/manager_stats_MNM.lua"]:848: bad argument #3 to 'gsub' (string/function/table expected)

    I mean that is the file. That is the exact line number in the file. I admit I fixed all the missing 3rd arguements of DB.getValue for "name" in that file so that when they built their respective messages they could never blow up on me. For example...

    Code:
    	local messageText=string.gsub(DB.getValue(nodeMsg,"bestDmgMsg"),"NAME",DB.getValue(nodePC,"name", ""));
    It will not fix the issue - but I'm lazy - this will insure it does not blow up. As this error seems to only happen for me when some existing resource is missing or lost (like a module not loaded or no longer present in campaign DB).

    A cleaner fix would be to never even show/build the message if the name was not available, but like I said, I'm lazy.
    ok makes sense to me now. will teach me to start doing replies without enough coffee in me.

    thanks for the help

  8. #28
    Is there a way to reset the stats? did a session 0 one-shot and then some fiddling afterwards, and want a clean slate. Or if I can remove NPC's entries from the party sheet list maybe?
    Unity Ultimate Paid GM
    Carrion Crown L12 - PF1e: LFP 5/3+ Mondays @1pm MT
    Wrath of the Righteous L10T3 - PF1e: 6/3+ Mondays @5PM MT
    Horde of the Dragon Queen L13- 5e LFP 5/3+ Tuesdays @5PM MT
    Rise of the Runelords B L9 - PF1e: LFP 4/3+ Wednesdays @530PM MT
    Harbingers L4 - PF1e: 5/3+ Sundays @9am MT
    Unchained Harbingers L1 - PF1e: Wednesdays @9am MT
    General Looking for Work and current.

  9. #29
    Quote Originally Posted by Atracious View Post
    Is there a way to reset the stats? did a session 0 one-shot and then some fiddling afterwards, and want a clean slate. Or if I can remove NPC's entries from the party sheet list maybe?
    There is an unlock button and after clicking that the GM can manually override any stat. Also if you right click on any noc row you can delete that row.
    If you are using latest version anyway.

  10. #30
    Hi, I am getting the following error when loading this extension. Not game breaking by any means but it is there.

    Screenshot (12).png

Thread Information

Users Browsing this Thread

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

Bookmarks

Posting Permissions

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

Log in

Log in