ChancellorKremlin Posted October 23, 2012 Posted October 23, 2012 It's for SexoutDrugs, something keeps making it crash after sex, and I've been unable to figure out what. If anybody could pinpoint any errors, I would really appreciate it. scn 00SexoutDealersQuestScript short WIP short testface ;streetwalking related variables short pcturnedout short priceset short trickssewers short tricksnorthvegas short tricksfreeside short swrejectchance short swsewerstage short swsewerearningsT short swsewerearningsP short swsewerdebt short swcanpaypimp float swsewerlastpaid float swsewerpaygap ; these are the marco-related variables short marcodeals short marcoaltactive short marcosated float marcocooldown short marcoa short marcoo short marcov ; these relate to marco's msoab questline short marcoQmsoab short marcoQmsoabticker short marcoQmsoabsated float marcoQmsoabcooldown short marcoQmsoabFCP short marcoQmsoabFCT ; these relate to marco's freeside questline short marcoQfreesiders short marcoQfreesidersFCT short marcoQfreesidersFCP ; and these are the dixon-related variables short dixondeals short dixonaltactive short dixona short dixonv short dixono begin gamemode if marcocooldown < gamedayspassed if marcosated == 1 set marcosated to 0 endif endif if marcoQmsoab == 4 if marcoQmsoabticker < gamedayspassed set marcoQmsoab to 5 endif endif ; THIS CONTROLS MSOAB'S BEHAVIOUR if marcoQmsoabcooldown < gamedayspassed && marcoQmsoabsated == 2 set SexoutDealers.MarcoQmsoabCooldown to gamedayspassed + 0.25 set marcoQmsoabsated to 1 endif if marcoQmsoabcooldown < gamedayspassed && marcoQmsoabsated == 1 && MarcoQMSOAB >=10 set marcoQmsoabsated to 0 endif if marcoQmsoab == 8 && marcoQmsoabFCP >= 10 && Player.GetItemCount 00SexoutActor > 0 && MeanSonOfABitchRef.GetItemCount 00SexoutActor > 0 set marcoQmsoab to 9 endif if marcoQmsoab == 9 && Player.GetItemCount 00SexoutActor == 0 showmessage SexoutDDMeanLove MeanSonOfABitchRef.removescriptpackage MeanSonOfABitchRef.addscriptpackage SexoutDDMeanFollow set marcoQmsoab to 10 endif if Player.GetInCell Westsid == 1 && Player.IsInInterior == 0 && MarcoQMsoab >= 10 && MeanSonOfABitchRef.getcurrentaipackage != 6 && MeanSonOfABitchRef.GetItemCount 00SexoutActor == 0 MeanSonOfABitchRef.addscriptpackage SexoutDDMeanFollow elseif Player.GetInCell Westsid != 1 && MeanSonOfABitchRef.getcurrentaipackage == 1 MeanSonOfABitchRef.removescriptpackage SexoutDDMeanFollow endif if Player.GetInCell Westsid == 1 && MarcoQMsoab >= 11 && MarcoQMSOABSated == 0 && MeanSonOfaBitchRef.getcurrentaipackage == 1 && MeanSonOfABitchRef.GetItemCount 00SexoutActor == 0 MeanSonOfABitchRef.removescriptpackage MeanSonOfABitchRef.addscriptpackage SexoutDDMeanGrab endif ; SEWER PIMP if trickssewers >= 5 && swsewerstage == 0 set swsewerstage to 1 SODDPimpSewersRef.enable endif if swsewerstage == 10 set swsewerdebt to swsewerearningsT / 2 if swsewerdebt <= player.getitemcount caps001 set swcanpaypimp to 1 else set swcanpaypimp to 0 endif set swsewerpaygap to gamedayspassed - swsewerlastpaid if gamedayspassed > swsewerlastpaid + 1.5 ; PIMP CHASE SODDPimpSewersRef.addscriptpackage SexoutDDSewerPimpGreet endif endif end or these triggers? result scrip begin: set SexoutNG.ActorA to GetSelf set SexoutNG.ActorB to Player Player.CIOS SexoutNGBegin set SexoutNG.ActorA to GetSelf set SexoutNG.ActorB to Player set SexoutNG.IsVaginal to 1 set SexoutNG.CBDialogA to SDCallbackGeneral Player.CIOS SexoutBegin result script end: set SexoutDealers.MarcoQFreesidersFCT to SexoutDealers.MarcoQFreesidersFCT + 1 set SexoutDealers.MarcoQFreesidersFCP to SexoutDealers.MarcoQFreesidersFCP + 1 set SexoutDealers.dixondeals to 1 set SexoutDealers.dixonv to 1 player.additem Jet 1 player.equipitem Jet if SexoutDealers.pcturnedout == 0 set SexoutDealers.pcturnedout to 1 endif Thanks.
Halstrom Posted October 23, 2012 Posted October 23, 2012 Hmm can't see anything obvious, usage of GetSelf instread of GetContainer can cause crashing of scripts, GetSelf for effect scripts and object scripts on actors but GetContainer for other Object scripts. FNVEdit may show something when you use "Check for Errors", another one to try is comment out the last endif and makesure you get an error, if you don't you've got an extra one somewhere.
DoctaSax Posted October 23, 2012 Posted October 23, 2012 Nothing grabbing my eye either. Since it happens after sex, I'd focus my troubleshooting on the callback stuff: is that CB dialogue topic still valid, for instance?
ChancellorKremlin Posted October 23, 2012 Author Posted October 23, 2012 Thanks guys. Yes, it is still valid. At first, it made the crashes disappear. But then I tried it again at a later point, and the crashes returned, making me think it was something else. It must be one of the set variable conditions at the end that is causing the problem, but I can't put my finger on it. Or maybe Dixon/Marco/johns are having trouble reverting to their AI behaviour packages after sex? I'm beginning to think I'm going to have to re-write the plugin from scratch if I can't figure out the culprits.
Halstrom Posted October 23, 2012 Posted October 23, 2012 Thanks guys. Yes' date=' it is still valid. At first, it made the crashes disappear. But then I tried it again at a later point, and the crashes returned, making me think it was something else. It must be one of the set variable conditions at the end that is causing the problem, but I can't put my finger on it. Or maybe Dixon/Marco/johns are having trouble reverting to their AI behaviour packages after sex? I'm beginning to think I'm going to have to re-write the plugin from scratch if I can't figure out the culprits.[/quote'] Start commeting out lines it will run without and see how it runs or copy the whole script int a notepad file then add lines back in to see where it goes wrong.
ChancellorKremlin Posted October 23, 2012 Author Posted October 23, 2012 In a previous test, I got rid of the crashing by removing dixon sated, time passed and cooldown variables. Perhaps that is what was setting it off. I'm going to break it down to its bare bones and see whats what. Thanks Halstrom.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now