Aramiteus Posted July 10, 2012 Share Posted July 10, 2012 Hello, Is there a thread (or better a Problem Reporting System) for code errors (Helping prideslayer to improve the code)? I've just started to evaluate sexout for usability for a mod idea. Found this issue in scn 00SexoutQuestScript used by sexout Quest. set frequency to numSex / ( GameDaysPassed - startDay ) Won't this lead to division by 0 if GameDaysPassed == startDay? Will test what happens on the division by 0 and report back. cu Aramiteus P.S.: Tested it. Does not lead to a crash as feared but to 17,6 sex frequency in MCM after the first time having sex on the first day. The script engine is intelligent enough to prevent the division by 0 crash common in "normal" programming languages. (Replaces perhaps the 0 by something small about 0.05) So it is a minor issue as only statistics are affected. Link to comment
Halstrom Posted July 10, 2012 Share Posted July 10, 2012 Good find, I've done the old divide by zero a couple of times by accident and did get scripts lockup & stop Link to comment
Aramiteus Posted July 10, 2012 Author Share Posted July 10, 2012 Ouch. I've looked at. In http://cs.elderscrolls.com/index.php/Special_variables Seems it is outdated or invalid for FNV. GameDaysPassed is documented as a short. But in fact it seems to be a float. So you have to have sex very fast to create a division by zero. This is the right page: http://geck.bethsoft.com/index.php/Special_Variables Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.