-
August 3rd, 2018, 02:07 #1
Windowclass script working differently in 3.3.6?
In my Strain/Injury HP Variant extension for 3.5/PF I modify the client_ct_entry windowclass as follows:
Code:<windowclass name="client_ct_entry" merge="join"> <script file="ct/scripts/clientct_entry.lua" /> <sheetdata> <number_clientct_injury name="injury" insertbefore="wounds" /> <number_clientct_nonlethal name="nonlethal" merge="delete" /> </sheetdata> </windowclass>
Code:<windowclass name="client_ct_entry" merge="join"> <script file="ct/scripts/clientct_entry.lua" /> <sheetdata> <base_clientct_health name="healthbase" insertbefore="initresult" /> <string_clientct_status name="status" insertbefore="initresult" /> <number_clientct_wounds name="wounds" insertbefore="initresult" /> <number_clientct_nonlethal name="nonlethal" insertbefore="initresult" /> <number_clientct_hptemp name="hptemp" insertbefore="initresult" /> <number_clientct_hp name="hp" insertbefore="initresult" /> </sheetdata> </windowclass>
Code:Script Error: [string "ct/scripts/clientct_entry.lua"]:20: attempt to index global 'nonlethal' (a nil value)
Code:function onHealthChanged() local sColor = ActorManager2.getWoundColor("ct", getDatabaseNode()); wounds.setColor(sColor); injury.setColor(sColor); <-- Line 20 status.setColor(sColor); end
Code:function onHealthChanged() local sColor = ActorManager2.getWoundColor("ct", getDatabaseNode()); wounds.setColor(sColor); nonlethal.setColor(sColor); <-- Line 20 status.setColor(sColor); end
Thanks in advance for any help. If I can provide additional info, let me know.Last edited by darrenan; August 3rd, 2018 at 03:52.
-
August 3rd, 2018, 02:30 #2
a lot of changes happens in the ct files.
you will need to look for the different templates and scripts now in use.
-
August 3rd, 2018, 03:51 #3
my question is very specific. It has to do with the specific windowclass and its associated script file as explained in post #1. All the template changes were easy to track down and resolve. I don't think that is the issue in this case.
-
August 3rd, 2018, 03:55 #4
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
darrennan, it sounds to me like you have an unpacked ruleset problem? Otherwise, I don't see how it can be happening assuming your lua file doesn't in fact reference the deleted control.
-
August 3rd, 2018, 03:59 #5
nope, no unpacked ruleset in my rulesets directory.
rulesets dir.png
-
August 3rd, 2018, 04:01 #6
You are deleting the number_clientct_nonlethal so the 3.5e script cannot find it.
EDIT: Ok - I understand what you are saying now.
-
August 3rd, 2018, 04:02 #7
Attaching the current version of the extension if that helps.
StrainInjury.ext
EDIT: In case I wasn't clear, the script error only happens on the client side, not on the host side.
-
August 3rd, 2018, 04:06 #8
I dont know if this **might** help....
https://www.fantasygrounds.com/forum...l=1#post397382
I had a merge=delete issue a little while ago that was resolved by completely closing and relaunching FG... just maybe...
-
August 3rd, 2018, 04:18 #9
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Oh. Well, apparently, there are some changes in window_classes for the combat tracker on the client side. There may be some code elsewhere that is only executed for client that needs that node to be there. See if there is another file with that name in the code base that is nested under a client side ct window?
-
August 3rd, 2018, 17:55 #10
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks