"H:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\zSpellTomeTeleport.psc(31,4): type mismatch while assigning to a int (cast missing or types unrelated)"
Scriptname zSpellTomeTeleport extends activemagiceffect{Teleport to a city of your choice and then back to where you were}ObjectReference property WhiterunBreezehome autoObjectReference property WhiterunMarketplace autoObjectReference property WhiterunJorrvaskr autoObjectReference property WhiterunSkyforge autoObjectReference property WhiterunDragonsreach autoObjectReference property TeleTarget auto ;The XMarkerHeading that gets recalled to players locationMessage property QuestionMSGR auto ;Points to RecallMessage property QuestionMSGM auto ;Points to Mainbox, containing all the cities the player is able to choose fromMessage property QuestionMSGWR auto ;Points to Whiterun locations question boxMessage property QuestionMSGS auto ;Points to Solitude locations question boxMessage property QuestionMSGD auto ;Points to Dawnstar locations question boxGlobalVariable property SpellSwitch autoActor casterObjectReference casterRef int Recall ;The return question box(offered when the spell has already been used once before.)int Mainbox ;The main question box, containing all the cities to choose fromint Whiterun ;The Whiterun locations question boxint Solitude ;The Solitude locations question boxint mySpellSwitchEvent OnEffectStart(Actor akTarget, Actor akCaster) caster = akCaster casterRef = (caster as ObjectReference) mySpellSwitch = SpellSwitch.GetValue()if mySpellSwitch == 1 Utility.Wait(0.3) ;Waits 0.3 seconds SpellSwitch.SetValue(0) Recall = QuestionMSGR.Show() if Recall == 0 casterRef.MoveTo(TeleTarget)elseMainbox = QuestionMSGM.Show() ;Shows the main question box containing all the cities you can choose to teleport to ;Start of locations message box partif Mainbox == 0 Whiterun = QuestionMSGWR.Show() ;Shows Whiterun locations question boxUtility.Wait(0.2) ;Waits 0.2 secondselseif Mainbox == 1Solitude = QuestionMSGS.Show() ;Shows Solitude locations question boxUtility.Wait(0.2) ;Wait 0.2 seconds;End of locations message box part;Start of Whiterun Locations script partif Whiterun == 0TeleTarget.MoveTo(caster) Utility.Wait(0.2) ;Waits 0.2 secondscasterRef.MoveTo(WhiterunBreezehome) ;Moves the player to BreezehomeSpellSwitch.SetValue(1)elseif Whiterun == 1TeleTarget.MoveTo(caster) Utility.Wait(0.2) ;Waits 0.2 secondscasterRef.MoveTo(WhiterunMarketplace) ;Moves the player to MarketplaceSpellSwitch.SetValue(1)elseif Whiterun == 2TeleTarget.MoveTo(caster)Utility.Wait(0.2) ;Waits 0.2 secondscasterRef.MoveTo(WhiterunJorrvaskr) ;Moves the player to JorrvaskrSpellSwitch.SetValue(1)elseif Whiterun == 3TeleTarget.MoveTo(caster)Utility.Wait(0.2) ;Waits 0.2 secondscasterRef.MoveTo(WhiterunSkyforge) ;Moves the player to SkyforgeSpellSwitch.SetValue(1)elseif Whiterun == 4TeleTarget.MoveTo(caster)Utility.Wait(0.2) ;Waits 0.2 secondscasterRef.MoveTo(WhiterunDragonsreach) ;Moves the player to DragonsreachSpellSwitch.SetValue(1)endifendifendifendifEndEvent;End of Whiterun locations script part.
