ElliotSternberg Posted October 31, 2012 Share Posted October 31, 2012 I'm really annoyed. I wanted to make a bank for part of a mod I'm making, but the damn code won't compile right. =/ I keep getting the error below:Compiling "WithdrawGoldScript"... g:\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\WithdrawGoldScript.psc(7,4): type mismatch while assigning to a int (cast missing or types unrelated) No output generated for WithdrawGoldScript, compilation failed. I can't figure it out. I've searched for about 2 hours, so please offer some quick help. (It's probably a face-palm worth error if past experience is anything to go by.) Here's the code:Scriptname WithdrawGoldScript extends activemagiceffect ObjectReference Property Gold001 Auto GlobalVariable Property GoldStoredInBank auto Event OnEffectStart(Actor player, Actor akCaster) int goldvar = GoldStoredInBank.Getvalue() if(goldvar >= 1000) GetCasterActor().AddItem(Gold001, 1000) goldvar - 1000 ElseIf(goldvar < 1000) GetCasterActor().AddItem(Gold001, goldvar) goldvar = 0 Debug.MessageBox("You're out of Septims, please deposit more soon to take advantage of our payment services!") Else Debug.MessageBox("You're out of Septims! Careful or you'll have some... collectors coming...") EndIf EndEvent I've got a global variable in the CK that it refers to. This is on a magic effect, so I can make a lesser power to activate this. Let me know what to do, thanks a million. Link to comment Share on other sites More sharing options...
Ghaunadaur Posted October 31, 2012 Share Posted October 31, 2012 Try replacing GetValue() with GetValueInt(). Link to comment Share on other sites More sharing options...
ElliotSternberg Posted October 31, 2012 Author Share Posted October 31, 2012 And that's why I hate coding anything. :wallbash: So finicky. I do wish there was a more comprehensive reference guide, as even the official site is pretty lacking. Thanks a bunch though! Link to comment Share on other sites More sharing options...
Recommended Posts