-
October 19th, 2017, 03:07 #21
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,650
When you use setValue, it will trigger an onValueChanged event on the control and an onUpdate event on the databasenode. If either of those script calls ends up calling another setValue call on the same control/node before control is returned to the client, then the setValue script call is aborted and the warning message generated.
Usually, this is indicative of a circular update. (i.e. setValue -> onUpdate -> setValue -> onUpdate -> ...)
Cheers,
JPG
-
October 19th, 2017, 04:03 #22
Thanks Moon and Bidmaron I found it.
It was not that I didn't close a handler but it was a handler causing it.
When I created the Ability Score Editor box I had the stat Base/Mod/Encumbrance fields write to the DB abilities.
Then the handler was for "abilities" so when I would update the .base the onUpdate would run and update the .score which is also in "abilities" so the handler triggered again since abilities updated again.
I moved the editor fields to "abilitiesedit" and changed the handler to it.
No more error.Last edited by Samarex; October 19th, 2017 at 04:32.
Discord User : Samarex#0318
Ultimate License
Starfinder Society ID#:274538
Lets Play a RPG
-
October 19th, 2017, 04:49 #23
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
You can also temporarily disarm the habndler by removing it and reinstalling it or you can put on a semaphore that you check in the handler and skip processing if the semaphore is flagged
-
October 19th, 2017, 08:30 #24
Every once in awhile I delude myself into thinking "I could get into this programming thing" - and then a conversation ike this happens and I realize how far out of my depth I really am.
-
October 19th, 2017, 08:50 #25
-
October 19th, 2017, 09:07 #26
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,650
Hah, I feel like that every time I take on a project I haven’t done before, and try to understand all the material I can find on the new programming subject. You learn by your mistakes.
JPG
-
October 19th, 2017, 11:11 #27
@All- [Starfinder] Stamina + Con bonus. If you have a 13 Con that gives you a +1 bonus / with 2 points of Con damage making your bonus 0. If you level at this stage does your Stamina increase Class Stamina + 1 or Class Stamina +0?
Question 2 If I Have 13 Con Bonus +1 With a Level 6 Operative that give me a Max Stamina of
(6+1)*6=42 now I took some hits and my Current Stamina is 30. I get hit with a bite that does 6 damage and 2 points Con drain.
This drops my Stamina to 24 and the Con Drain drops my bonus to 0
With the Drop in Con Bonus my Max Stamina drop to 42-6 (6 Levels at +1) taking me to 36 Max.
Question is does my Current also drop 6 to 18?Last edited by Samarex; October 19th, 2017 at 13:38.
Discord User : Samarex#0318
Ultimate License
Starfinder Society ID#:274538
Lets Play a RPG
-
October 19th, 2017, 13:49 #28
Ok night is done.
Got Envoy input today and played around some on the extension. I got Stamina worked out. I can change it depending on answers fro last post. But right now it auto updates Stamina completely. We don't need to worry about adding in the Con bonus at 1st level anymore. And on top of that your Stamina updates automatically if you take Constitution damage that drops your bonus down or when you recover Con damage it updates back to what it should be.Discord User : Samarex#0318
Ultimate License
Starfinder Society ID#:274538
Lets Play a RPG
-
October 19th, 2017, 14:27 #29
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Ok that was very code snobbish. Sorry about that. I should be the last one doing that because I haven’t done professional programming (some might say never) for 40 years.
Ok, to disarm a handler you generally copy the handler setting (e.g. saveHandler=db.onHandler; where onHandler is the name of whatever handler you are disarming
And then
db.onHandler=nil, do the thing that would have caused you to descend into recursive hell, and then rearm the handler (e.g. db.onHandler=saveHandler
The semaphore is a technique to violate good programming through the use of a Boolean global in scope to the handler and the code where you are doing the recursive evil. In your handler, you check the status of the semaphore and return without processing if the semaphore is set. (E.g.
if bSemaphoreSet then
Return;
End
)
If you want to follow better programming practice, you can eliminate reliance upon the global by making a Boolean local to the code file of the handler, e.g. bSemaphore, and then including simple routines that other code can call to flag or unflag the semaphore (e.g.
function setAbilitySemsphore
bAbilitySemaphore=true;
End
And a similar clearAbilitySemaphore that clears the flag.) Your handler simply skips processing just like before (you an even use a semaphoreSet function if your sensibilities dictate that returns the semaphore status if you want to conceal the flag scope because you are a purist).
-
October 19th, 2017, 15:27 #30
@Moon There seems to be a bug in the 3.5/Pathfinder system. Unless I am misunderstood in how it works. Its with the ability score dam field. I understand it as it a representation of a lose it ability score. I.e 12 con with 1 point damage is saying you have a 11 con. If that's correct. There is a bug
If I adjust my score from 12 to 11 my bonus goes from 1 to 0. So it 1 point of damage takes me too 11 then shouldn't my Bonus go to 0. If I have a 12 con it takes 2 point of damage to drop me to 0 bonus.Discord User : Samarex#0318
Ultimate License
Starfinder Society ID#:274538
Lets Play a RPG
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks