Odessa Posted July 23, 2014 Posted July 23, 2014 If you wanted to check if the variable existed for the companion, does HasVariable work (nvse_whatsnew implies this only works for quests), or is there an alternative?
jaam Posted July 23, 2014 Posted July 23, 2014 Good question, and the answer is yes it will work. Has Variable has the same syntax as GetVariable, except the return value is a bool not a value. EDIT: it can either be called on a reference, or you can specify a quest.
Guest tomm434 Posted July 23, 2014 Posted July 23, 2014 jaam, you and NVSE team are awesome. "I put off my hat" as we say in Russia.
nyaalich Posted July 23, 2014 Posted July 23, 2014 "I tip my hat to you," is what we say here in 'Murica.
nyaalich Posted July 23, 2014 Posted July 23, 2014 The phrase would be better if a monocle was involved. Sadly, the T-rex cannot tip his hat to anyone.
Guest tomm434 Posted July 23, 2014 Posted July 23, 2014 jaam, I've got a possible bug for you.(I didn't update to new version yet. I can if that's important) ref ConversationPackage set ConversationPackage to MyPackage set GetType1 to ConversationPackage.GetType Print $GetType1 Print $ConversationPackage LunetteRef.addscriptpackage ConversationPackage So, get type returns 0 after package is set but the package package is added and executed just fine. I decided to investigate this after code didn't run further this line: if ConversationPackage.gettype ==73 ;73 goes for Package type
Xilandro Posted July 23, 2014 Posted July 23, 2014 I have a little request for new function (not right now though, but for the future updates, I know there's a lot of other, more complicated things in NVSE with higher priority). Player.HasPerk SomePerkID returns 1 or 0 in script, and returns "perk rank →→ 1" if typed into console. It will be great to get some HasPerk2 function that will return this string via script, so I can just do Let svRank := Player.HasPerk2 SomePerkID, and svRank will be "perk rank →→ 1" I know people were looking for solution how to track perk ranks for a long time, and still there's only one way to track it, new entry point for each rank with ability that will +1 some value (and incompatibility issues bc of such way of tracking). But string var with "perk rank" will fix it once and for all.
DoctaSax Posted July 23, 2014 Posted July 23, 2014 jaam, I've got a possible bug for you.(I didn't update to new version yet. I can if that's important) ref ConversationPackage set ConversationPackage to MyPackage set GetType1 to ConversationPackage.GetType Print $GetType1 Print $ConversationPackage LunetteRef.addscriptpackage ConversationPackage So, get type returns 0 after package is set but the package package is added and executed just fine. I decided to investigate this after code didn't run further this line: if ConversationPackage.gettype ==73 ;73 goes for Package type Try: GetType ConversationPackage instead of reference syntax You may have passed the package to a ref var, but that doesn't make it a reference.
Odessa Posted July 24, 2014 Posted July 24, 2014 GetObjectType (GetType) seems to be returning 0 if used with let, and works with set. EDIT: Its because I had declared my variable as a ref, not int. Which apparently didn't matter with set.
Guest tomm434 Posted July 24, 2014 Posted July 24, 2014 I use NVSE4 Beta5 (I returned these values from GetNVSEVersion + GetNvseBeta) - I also remember that it was the first version where I could use "Let" syntax on object variables. So, GetType Package returns 74 in both "set" and "let" cases
Odessa Posted July 24, 2014 Posted July 24, 2014 I'm getting a CTD from calling IsRefInList. My code loops through every item in a container and does something to it, based on its type. I have this code: Print "I will run IsRefInList with: " + $rItem if eval (IsRefInList RobarNonLosableItemsFL, rItem) != NotFound ; * -1 let iRand := 101 endif Print "Successful" The form list I'm checking is empty. My SCOF log indicates the function works correctly for the first 40 items, but then CTDs imbetween those two print calls. AKH: LI - Stimpak (00015169) is type: 47AKH: LI - decide where item goesI will run IsRefInList with: StimpakSuccessfulAKH: Adding to form listsAKH: LI - Ronnie's Jet (4C001F4D) is type: 47AKH: LI - decide where item goesI will run IsRefInList with: Ronnie's JetSuccessfulAKH: Adding to form listsAKH: LI - Lakelurk Meat (00136E13) is type: 47AKH: LI - decide where item goesI will run IsRefInList with: Lakelurk Meat ( CTD ) The CTD is reproducible, always on the same loop item. EDIT: If I swap IsRefInList to ListGetFormIndex, then it works.
jaam Posted July 25, 2014 Posted July 25, 2014 Seems my response got lost yesterday (or I must have forgotten to send ) IsRefInList requires being rewritten. It's pretty ugly right now.
Odessa Posted July 29, 2014 Posted July 29, 2014 I am using NVSE 4.5.6 and got a CTD with the following exception message: Meaningless to me, and may be irrelevant to NVSE, although I don't recall seeing it before. EDIT: I should note, I installed Lutana plugin today and its broken, nothing should use it in load order and nothing is in its log, but it was still installed when I got message. I appreciate how vague this report is. nvse-log-exception.zip
Odessa Posted July 29, 2014 Posted July 29, 2014 Attached are all NVSE plugin logs for when I got the exception message above. I notice, nvse_extender.log0 ends with: Received unknown message 10 NVSE-plugin-logs-all-for-exception.zip
jaam Posted July 30, 2014 Posted July 30, 2014 The way prideslayer and I wrote the messaging interface in NX would do that, as would any plugin based on the nvse_plugin_example. 10 is kMessage_RuntimeScriptError so it is logical relative to the error reported above. One could write a plugin that does try to work with the string parameter of the message, but I' not sure you would get more than what you have in nvse.log. Is that done by one of your script of the debugging functions from SexoutSpunk ? Dumping Array #1232 ** Refs: 2 Owner 52: SexoutSpunk.esp [ 0.000000 ] : licked Error in script 520256fb Division by zero File: SexoutSpunk.esp Offset: 0x016A Command: Let Error in script 520256fb Operator / failed to evaluate to a valid result File: SexoutSpunk.esp Offset: 0x016A Command: Let Error in script 520256fb An expression failed to evaluate to a valid result File: SexoutSpunk.esp Offset: 0x016A Command: Let ** Given how "artistic" the way the script data is passed to the NVSE function, and the engine stripping out all EditorID during load it is hard to be more explicit. Maybe adding an HexDump of the 256 chars starting at the faulting offset ? Though you could paste the compiled script from FNVedit in an HexEditor for the same result
Guest Posted July 30, 2014 Posted July 30, 2014 I installed Lutana plugin today and its broken It is? functions don't work?
Odessa Posted July 30, 2014 Posted July 30, 2014 @AJ: Just 'FileExists', as far as I'm aware- gives you a CTD in V3, I let the author know and he found a bug and said its fixed in the forthcoming version. I had previously wondered if it was an incompatability with NVSE beta. Lutana has some exciting stuff. @ jaam: I uploaded another scof and logs in the sexoutng thread where the last line implied a sexout UDF was passed NULL strings, and prideslayer says this doesn't make sense. Then I got that exception message after next crash and posted it above. I speculate there is an NVSE error, which may also apply to those apparent spunk division by 0 errors.
Guest Posted July 30, 2014 Posted July 30, 2014 is there a way to stop nvse from writing its things on console and instead decide when do it? some... script function to enable/disable it?
Odessa Posted July 30, 2014 Posted July 30, 2014 Assuming the errors aren't due to a bug in NVSE, one way to stop them is to fix the bugs in your code (or detect the ones in vanilla/someone elses) Things like IsFormValid, IsReference, TypeOf, GetType, and checking array_var/string_var are initialiazed. I tend to put error checking of arguments into all my UDFs out of principal. I don't think a couple of validity checks are likely to impact performace even if the script runs every frame.
Guest Posted July 31, 2014 Posted July 31, 2014 It's probably some GetType called on a reference a couple of frames before it's spawned, or called on a Pencil01. These scripts run in gamemode, you can figure the continuous spam bam-bam-bam-bam-bam on console...
DoctaSax Posted August 1, 2014 Posted August 1, 2014 So I'm trying to make sense of these latest reports Odessa's been posting here & in the NG & spunk threads that may indicate an nvse error. Hard to keep track, so let me just itemize that, eh? 1st report, in the spunk thread: relevant log snippets: SpunkSpStartHook on Maida, 1D0071D9: stage 10SpunkFuReportActKeys called on Maida, 1D0071D9DD>> ===== Deep dump mode 2 - Depth= 2 - Array: [spunk Act Keys] =====DD>> [Floats][spunk:act:anim] = 113DD>> [Floats][spunk:act:cancum] = 1DD>> [Floats][spunk:act:count] = 1DD>> [Floats][spunk:act:duration] = 14DD>> [Floats][spunk:act:role:masturbator] = 1DD>> [Floats][spunk:act:zaz] = 0DD>> NULLError in script 5200a030Operator := failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: Error in script 5200a030An expression failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: DD>> NULLError in script 5200a030Operator := failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: Error in script 5200a030An expression failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: DD>> NULLSpunkFuReportActKeys called on Maida, 1D0071D9DD>> ===== Deep dump mode 2 - Depth= 2 - Array: [spunk Act Keys] =====Error in script 5200a030Operator := failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: Error in script 5200a030An expression failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: DD>> NULLError in script 5200a030Operator := failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: Error in script 5200a030An expression failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: DD>> NULLError in script 5200a030Operator := failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: Error in script 5200a030An expression failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: DD>> NULLError in script 5200a030Operator := failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: Error in script 5200a030An expression failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: DD>> NULLError in script 5200a030Operator := failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: Error in script 5200a030An expression failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: DD>> NULLError in script 5200a030Operator := failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: Error in script 5200a030An expression failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: DD>> NULLError in script 5200a030Operator := failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: Error in script 5200a030An expression failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: DD>> NULLError in script 5200a030Operator := failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: Error in script 5200a030An expression failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: DD>> NULLError in script 5200a030Operator := failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: Error in script 5200a030An expression failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: DD>> NULL DD>> ===== Deep dump mode 2 - Depth= 2 - Array: [tracked acts] =====DD>> [0][0] = 000E35D2 NCR TrooperDD>> [0][1] = 00000014 OdessaDD>> [0][2] = 1B0378E7 ClintDD>> [1][0] = 1D0071D9 MaidaDD>> [1][1] = 1D0071D9 MaidaDD>> [2][0] = 1D0071D7 GerdaDD>> [2][1] = 1D0071D7 Gerda DD>> ===== Deep dump mode 2 - Depth= 3 - Array: [spurt Tracking] =====DD>> [0][0][Gender] = 2DD>> [0][0][LastEval] = 135.768DD>> [0][0][Loc] = 'Rectum'DD>> [0][0][Race] = 0000424A African AmericanDD>> [0][0][RaceCat] = 'AfricanAmerican'DD>> [0][0][species] = 'Human'DD>> [0][0][Vol] = 1.13022DD>> [0][0][VolOr] . . .Error in script 5200a030Operator := failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: Error in script 5200a030An expression failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: DD>> [0][0][1.13022] . . .Error in script 5200a030Operator := failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x063E Command: Error in script 5200a030(and a few dozen more lines like that) Relevant scripts: SpunkSpStartHook, SpunkFuReportActKeys, SpunkFuDeepDump (5200a030) - see attached for the code Problem 1: the start hook calls ReportActKeys on the same actor twice, which means the same actor is seen as 2 different ones in the act, as evidenced by the "tracked acts" deepdump, but the act is only supposed to hold one. I pull involved actors from the "Sexout:Core:Partners" evfos, and act count from the "Sexout:Core:Actors:Count" evfl. This could have something to do with the way the act is started, but a similar problem (ActorC appearing in an act that doesn't have a C) was reported earlier too.Problem 2: SpunkFuDeepDump (5200a030) craps out when called to dump the temporary stringmap that SpunkFuReportActKeys constructs out of the NX_GETEVxxAr function returns. Right about that time would be when spunk's EVFos get reported (ie: the actor refs involved in the act).Problem 3: SpunkFuDeepDump also craps out when called to dump the spurt tracking arrays. Fishy. This UDF's been problem-free since the very beginning I started messing with arrays (november-ish). 2nd report, in the NG thread: Relevant log snippets: SpunkSpOrgasm on NCR Trooper, 1D00B48B, stage 6SpunkFuCheckOverflow called on Odessa, 00000014, checking 'Vagina'SpunkFuCheckOverflow: vol is 6.606428, voltot in 'Vagina' is 50.000000, max is 50.000000SpunkSpOrgasm: Voltot 50.000000SpunkFuCalcSprayO called on NCR Trooper, anim is 5302SpunkFuCalcSprayO:relpos for anim 5302 is '3B'SpunkFuCalcSprayO:Vagina,Oops 0.000000 spr1 1.352230 spr2 1.286288 spr3 0.830090 spr4 3.137819Error in script 520270d2Operator := failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x0733 Command: LetError in script 520270d2An expression failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x0733 Command: LetSpunkSpOrgasm on NCR Trooper, 1D00B48B, stage 7SpunkSpOrgasm on NCR Trooper, 1D00B48B, stage 8** Dumping Array #0 **Array does not exist fnCSE (766): from (00000000) on NCR Trooper (1D00B48B)fnCSE (766): is actorfnCSE (766): CV2fnSoCSv: NCR Trooper (1D00B48B) 'Sexout:Start::' -> NCR Trooper (1D00B48B) 'Sexout:Start:766::'fnSoNXClr Sexout:Start:: NCR Trooper (1D00B48B)fnCSE (766): Returning 1NGSAN (766): RandomSextype rndA 17CSE (766): initializing actorsCSE (766): init actorA NCR Trooper (1D00B48B), NCR Trooper (1D00B48B), NCR Trooper (1D00B48B)fnSoCSv: NCR Trooper (1D00B48B) 'NULL' -> NCR Trooper (1D00B48B) 'NULL' Relevant scripts: SpunkSpOrgasmScpt (520270d2), SpunkFuCalcSprayO - see attached Problem1: the stringmap returned by SpunkFuCalcSprayO's SetFunctionValue is not properly caught by SpunkSpOrgasm with the ar_spread array var. It is properly This shouldn't happen. Problem2: something ng-related, I dunno Looks like something is copied from something that doesn't exist - maybe. (Coincidentally, Odessa, considering the number of spurts in play there, it's small wonder you get some stutter - this is probably entirely due to the deepdump function that has to grab & print all that info. Tweak your settings a bit to... flush some of that out.) 3rd report, in this one: Relevant snippets: Relevant nvse.log snippetLoading array variablesLoading stringsWARNING: substantial numbers of string variables exist for the following files (may indicate savegame bloat):Sexout.esm (316 strings) Dumping Array #1227 **Refs: 2 Owner 52: SexoutSpunk.esp[ 0.000000 ] : lickedError in script 520256fbDivision by zeroFile: SexoutSpunk.esp Offset: 0x016A Command: LetError in script 520256fbOperator / failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x016A Command: LetError in script 520256fbAn expression failed to evaluate to a valid resultFile: SexoutSpunk.esp Offset: 0x016A Command: Let** Relevant script: SpunkFuCheckOrgStrength Problem 1: a lot more strings attached to NG than there probably should be. Honestly relieved it doesn't say that about spunk - yet Problem 2: div by 0 in SpunkFuCheckOrgStrength. The only division there is by the fDur variable. It should be set to something other than 0, although there may be a problem with the way I set it if the arousal system is off (was it?): let fDur := fTimer := Sexout.dftime fTimer there is a parameter var & I should probably not alter it in that script? report 1 scripts.7z report 2 scripts.7z report 3 script.7z
prideslayer Posted August 1, 2014 Author Posted August 1, 2014 The NG related issue, this line: fnSoCSv: NCR Trooper (1D00B48B) 'NULL' -> NCR Trooper (1D00B48B) 'NULL' is "impossible" if NVSE is functioning properly. Odessa verified that in her load order, nothing but sexout is calling the UDF (fnSexoutcopyStartvars) that prints that line. It happens at the top of the function: scn fnSexoutCopyStartvars ; Copies Sexout:Start NX vars from rSrc to rTgt and renames them ; into the Sexout:Started namespace. ; args ref rSrc ref rTgt string_var sOKey string_var sNKey ; internal array_var element array_var arTmp string_var nxKey string_var sRepl float fVal ref rVal Begin Function{rSrc rTgt sOKey sNKey} DebugPrint "fnSoCSv: %n (%i) '%z' -> %n (%i) '%z'" rSrc rSrc sOKey rTgt rTgt sNKey So it should only print null if it's given a null sOKey and/or sNKey. In sexout, those are never null. Here are both calls to the function, and there are only two in all of sexout. in fnSexoutCSE: call fnSexoutCopyStartvars self self "Sexout:Start::" "Sexout:Start:" + $nActId + "::" in fnSexoutCSEActorInit: call fnSexoutCopyStartvars self rActor nxKey "Sexout:Started::" You can see that in one of the calls (the second), one of the strings might be null -- but it's "not possible" for both of the strings to be null in either call. The log snippet that DoctaSax copied shows both strings as NULL (last line).
Guest tomm434 Posted August 3, 2014 Posted August 3, 2014 jaam, I also have problem wiith the version 4 beta 6 Code is: (call from dialogie result script) let LunetteRef.isFollowing := 0 let LunetteRef.isWaiting := 1 LunetteRef.evp LunetteRef.movetomarkerwithfade VThornLucyToRoomPath07MarkerREF 400 0 0 Print $LunetteRef.isFollowing Print $LunetteRef.isWaiting Ingame I get this. Also I just realised that there is no "isWaiting" variable - it's just "Waiting" - "LunetteRef.Waiting". But with let syntax it complies fine. With "set" syntax it throws an error like it should. If I try "let LunetteRef.isWaitingfd := 1" (I added a suffix) - it throws an error. And I just tried to change "Waiting" to "isWaiting" in NPC's object script and I can't do that. So ok, I'm fine with that. But why does "isWaiting" complied with "let" anyway? Is it some internal variable like "FollowerSwitchAggressive" or something?
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