Jump to content

SetVariable and SetStringSetting


Maxandmov

Recommended Posts

Those both just refuse to work. I'll quote the code below.

Help is much appreciated.

1. SetStringSetting.

if Var == 1
let stName := "Name1"
SetStringSetting sDefaultPlayerName stName
else
let stName := "Name2"
SetStringSetting sDefaultPlayerName stName
endif

2. SetVariable
P.S. There are lots of conditions, but it looks like this if to cut short:



...
SetVariable "sUseAmount", -1, rTarget
... 

;---OR---

...
SetVariable "sUseAmount", 1, rTarget

Where sUseAmount is an EXISTANT (I checked via HasVariable function intentionally to verify I didn't mistake anywhere grammar-wise) variable for rTarget reference (that's a system that does some parsing depending on Target's reference ID).

I tried with ',', without it, and in other form of function usage. None worked properly.

1) is used in result script in quest, whilst 2) is used in User Defined Function. I also tried to use 2) in around the same form in main script for the system, but it still didn't work.

Then again, thanks if you help me solve that riddle!

Oh, and in regards of 1). I tried using NVSE's function but GECK wiki for JIP LN NVSE claims that NVSE's function is broken. So I don't know, really, what's wrong.

Link to comment
Share on other sites

SetStringSetting: try using the ToString prefix for the value:

SetStringSetting sDefaultPlayerName, $stName

 

SetVariable: if rTarget is a reference, then you probably need to use reference syntax:

rTarget.SetVariable "sUseAmount", -1

I tried the reference syntax and it hugely argued about this. Probably because it doesn't know whether quest ID or Form ID is contained in ref.

 

As about the first snippet - I think I tried that, too. But I'll try again. It's still not working, yeah. Any other thoughts?

Edited by Maxandmov
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...