Need help, script seems correct, but won't compile

Post » Tue Jun 19, 2012 1:36 am

Me and a friend have been struggling to figure out what's causing this compile error. Here's the script. The error that I get when compiling is

"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.
User avatar
Hayley O'Gara
 
Posts: 3465
Joined: Wed Nov 22, 2006 2:53 am

Post » Tue Jun 19, 2012 10:55 am

Replace "mySpellSwitch = SpellSwitch.GetValue()" with "mySpellSwitch = SpellSwitch.GetValueInt()"

You have all those useless/redunant comments in there and miss that GlobalVariable.GetValue returns a float... To much nonsense, try to keep it short.
User avatar
priscillaaa
 
Posts: 3309
Joined: Sat Dec 30, 2006 8:22 pm

Post » Tue Jun 19, 2012 12:35 pm

That was it! It compiled. Thanks! Can you tell me why was the error caused?
User avatar
Kat Stewart
 
Posts: 3355
Joined: Sun Feb 04, 2007 12:30 am

Post » Tue Jun 19, 2012 1:30 pm

-snip-
User avatar
Claire Jackson
 
Posts: 3422
Joined: Thu Jul 20, 2006 11:38 pm

Post » Tue Jun 19, 2012 12:59 pm

Because an int (integer) is quite a differant from a float (floating-point) number, and Papyrus does not like implicit type convesions -- even when it can do them. So you can either explicity cast the result of GetValue to int like this "...GetValue() as int" or you use GetValueInt() instead which does exactly that.
User avatar
IsAiah AkA figgy
 
Posts: 3398
Joined: Tue Oct 09, 2007 7:43 am

Post » Tue Jun 19, 2012 8:21 am

Gotcha. Although, now a new problem has arisen. That script is for a spell, that when used, pops up a message box that lets you choose a city to teleport to. Then, once you pick it, it teleports you to the selected location. Then, once you use the spell again, it's suppose to only pop up the message box with the Return button, so you can go back to where you were. But the issue is, even though the script compiled, the spell does not work at all. Nothing happens when I use it.

Here's the full script, as it looks now. It compiles with no errors, but like I said, the spell doesn't work anymore in game.

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.GetValueInt() 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() ;Start of locations message box partif Mainbox == 0  Whiterun = QuestionMSGWR.Show()  Utility.Wait(0.2)  elseif Mainbox == 1Solitude = QuestionMSGS.Show() Utility.Wait(0.2) if Whiterun == 0TeleTarget.MoveTo(caster)  Utility.Wait(0.2) casterRef.MoveTo(WhiterunBreezehome) SpellSwitch.SetValue(1)elseif Whiterun == 1TeleTarget.MoveTo(caster) Utility.Wait(0.2)  casterRef.MoveTo(WhiterunMarketplace) SpellSwitch.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) casterRef.MoveTo(WhiterunSkyforge) SpellSwitch.SetValue(1)elseif Whiterun == 4TeleTarget.MoveTo(caster)Utility.Wait(0.2) casterRef.MoveTo(WhiterunDragonsreach)  SpellSwitch.SetValue(1)endifendifendifendifEndEvent
User avatar
RObert loVes MOmmy
 
Posts: 3432
Joined: Fri Dec 08, 2006 10:12 am

Post » Tue Jun 19, 2012 1:09 am

I may be misunderstanding what you're trying to do, but it looks like you need an endif after
if Recall == 0         casterRef.MoveTo(TeleTarget)
otherwise the spell does nothing if mySpellSwitch is 0.
User avatar
Kaley X
 
Posts: 3372
Joined: Wed Jul 05, 2006 5:46 pm

Post » Tue Jun 19, 2012 4:09 am

Add some debugging code, look at http://www.creationkit.com/Trace_-_Debug and http://www.creationkit.com/Notification_-_Debug, you'll figure it out.

Just note that any fields (variables outside of any event or function) will get deleted as soon as the script gets deleted, so they cannot really hold any state.

Also you don't have to cast akCaster to ObjectReference, it is an OR already, use just it directly.
User avatar
Alex Blacke
 
Posts: 3460
Joined: Sun Feb 18, 2007 10:46 pm

Post » Tue Jun 19, 2012 2:13 pm

I'll try both of your suggestions and report back.

Update: What bwillb suggested did make the spell "Work" It shows the message boxes now, but doesn't actually teleport you. I'll use the Debug thing to see where it errors.
User avatar
Angus Poole
 
Posts: 3594
Joined: Fri Aug 03, 2007 9:04 pm

Post » Mon Jun 18, 2012 11:59 pm

Thanks to debug notification, script has been fixed. It works properly now. Were were missing an end if at:

if Mainbox == 0    Debug.Notification("Whiterun chosen")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 secondsendif;End of locations message box part  Debug.Notification("Between popups")
User avatar
Emma Pennington
 
Posts: 3346
Joined: Tue Oct 17, 2006 8:41 am

Post » Tue Jun 19, 2012 12:13 am

You should really indent code blocks as you go so it's super easy to spot missing end statements.
User avatar
roxxii lenaghan
 
Posts: 3388
Joined: Wed Jul 05, 2006 11:53 am

Post » Tue Jun 19, 2012 7:17 am

Yeah I'll work on that. Got another question. Spell works properly now except one thing. I can teleport to Whiterun locations and back, but if I pick ANY Solitude location, it just teleports me to "WhiterunBreezehome", which is the first location in the Whiterun locations script part. Here's the script. Ignore all the Debug.Notification stuff, I was trying to spot what's wrong.
User avatar
Lucie H
 
Posts: 3276
Joined: Tue Mar 13, 2007 11:46 pm

Post » Mon Jun 18, 2012 10:36 pm

You should really indent code blocks as you go so it's super easy to spot missing end statements.
Yeah I'll work on that.
That code is practically impossible to read in its current state. Instead of going through it an indenting it myself, I'm going to request that you work on that urgently. Trust me, it will greatly increase your chances of getting scripting help if reading your code doesn't feel like a massive chore.

Cipscis
User avatar
Matthew Barrows
 
Posts: 3388
Joined: Thu Jun 28, 2007 11:24 pm

Post » Tue Jun 19, 2012 12:52 am

I'll try to fix it an repost. It is quite redable in Sublime Text 2 but when I paste it here, it goes [censored] all.
User avatar
ezra
 
Posts: 3510
Joined: Sun Aug 12, 2007 6:40 pm

Post » Mon Jun 18, 2012 10:38 pm

You need the part where you check for whiterun or solitude values to be inside the corresponding mainbox conditionals. What you're doing right now is checking the mainbox, and then disregarding that and teleporting to the first matching location out of any of them. If you select solitude, whiterun is going to still return 0. So when you check for whiterun == 0, it's going to return true.

Alternatively you could set Whiterun, etc. to invalid values when you create them.
int Whiterun  = -1 ;The Whiterun locations question box
User avatar
Michelle davies
 
Posts: 3509
Joined: Wed Sep 27, 2006 3:59 am

Post » Tue Jun 19, 2012 5:05 am

I'll try to fix it an repost. It is quite redable in Sublime Text 2 but when I paste it here, it goes [censored] all.
Ah, I might know the problem. Since the last update, I think this forum has been stripping tab characters out of posts. Try pressing the switch icon in the upper left corner of the post box to switch to "simple" mode - this should work. I always use this mode and it never seems to mess with my scripts' indentation.

Cipscis
User avatar
Rachel Hall
 
Posts: 3396
Joined: Thu Jun 22, 2006 3:41 pm

Post » Tue Jun 19, 2012 6:47 am

Here it is, I tried my best. The problem is when I copy paste it into the code in forums, the forum [censored] it all up.

Spoiler
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 SolitudeMainGate autoObjectReference property SolitudeCourtyard autoObjectReference property SolitudeProudspire autoObjectReference property SolitdueBluePalace autoObjectReference property TeleTarget auto  Message property QuestionMSGR auto  Message property QuestionMSGM auto  Message property QuestionMSGWR auto  Message property QuestionMSGS auto  Message property QuestionMSGD auto  GlobalVariable property SpellSwitch autoFunction Notification(string asNotificationText) native globalActor casterObjectReference casterRef  int Recall  int Mainbox  int Whiterun  int Solitude  int Dawnstar  int mySpellSwitchEvent OnEffectStart(Actor akTarget, Actor akCaster)	  caster = akCaster	  	  casterRef = (caster as ObjectReference)mySpellSwitch = SpellSwitch.GetValueInt()  if mySpellSwitch == 1	Utility.Wait(0.3)   ;Waits 0.3 seconds	SpellSwitch.SetValueInt(0)	Recall = QuestionMSGR.Show()		if Recall == 0		   casterRef.MoveTo(TeleTarget)endifelseUtility.Wait(0.5)Mainbox = QuestionMSGM.Show()   ;Shows the main question box containing all the cities you can choose to teleport to  if Mainbox == 0  	   Whiterun = QuestionMSGWR.Show()   ;Shows Whiterun locations question box	   Utility.Wait(0.2)  elseif Mainbox == 1	  Solitude = QuestionMSGS.Show()   ;Shows Solitude locations question box	  Utility.Wait(0.2)  elseif Mainbox == 2	  Dawnstar = QuestionMSGD.Show()   ;Shows Dawnstar locations question box	  Utility.Wait(0.2)endifif Whiterun == 0  TeleTarget.MoveTo(caster)    Utility.Wait(0.2)   ;Waits 0.2 seconds	 casterRef.MoveTo(WhiterunBreezehome)			 SpellSwitch.SetValueInt(1)elseif Whiterun == 1TeleTarget.MoveTo(caster)    Utility.Wait(0.2)  	 casterRef.MoveTo(WhiterunMarketplace)  	 SpellSwitch.SetValueInt(1)elseif Whiterun == 2   TeleTarget.MoveTo(caster)   Utility.Wait(0.2)  	 casterRef.MoveTo(WhiterunJorrvaskr)  	 SpellSwitch.SetValueInt(1)elseif Whiterun == 3   TeleTarget.MoveTo(caster)   Utility.Wait(0.2)  	 casterRef.MoveTo(WhiterunSkyforge)  	 SpellSwitch.SetValueInt(1)elseif Whiterun == 4  TeleTarget.MoveTo(caster)  Utility.Wait(0.2)  	casterRef.MoveTo(WhiterunDragonsreach)  	SpellSwitch.SetValueInt(1)if Solitude == 0    TeleTarget.MoveTo(caster)	  Utility.Wait(0.5)		 casterRef.MoveTo(SolitudeMainGate)		 SpellSwitch.SetValueInt(1)	elseif Solitude == 1  TeleTarget.MoveTo(caster)  Utility.Wait(0.2)	 casterRef.MoveTo(SolitudeCourtyard)	 SpellSwitch.SetValueInt(1)elseif Solitude == 2  TeleTarget.MoveTo(caster)  Utility.Wait(0.2)	 casterRef.MoveTo(SolitudeProudspire)	 SpellSwitch.SetValueInt(1)elseif Solitude == 3  TeleTarget.MoveTo(caster)  Utility.Wait(0.2)	 casterRef.MoveTo(SolitdueBluePalace)	SpellSwitch.SetValueInt(1)	   endif   endifendifEndEvent
User avatar
Louise Andrew
 
Posts: 3333
Joined: Mon Nov 27, 2006 8:01 am

Post » Mon Jun 18, 2012 10:31 pm

It looks like you pasted it in, then switched to simple mode? Try switching to simple more first - that way the forum won't insert all that extra formatting stuff (which doesn't work inside code tags anyway).

Cipscis

EDIT:

Much better now, although the indentation is still a bit funny... Not sure if that's the forums or you, though.

Cipscis
User avatar
Adrian Morales
 
Posts: 3474
Joined: Fri Aug 10, 2007 3:19 am

Post » Tue Jun 19, 2012 11:29 am

How does the above look like now? I really did my best, this forum is a mess to work with. :ermm:
User avatar
Roberto Gaeta
 
Posts: 3451
Joined: Tue Nov 06, 2007 2:23 am

Post » Mon Jun 18, 2012 11:51 pm

Add functions, to avoid re-typing or copy-&-pasting the same code again and again.
function Teleport(Actor source, ObjectReference destination)	TeleTarget.MoveTo(source)	Utility.Wait(0.2)	casterRef.MoveTo(destination)	SpellSwitch.SetValueInt(1)endfunction
This will be less error-prone, easier to read and maintain.

Edit: Hey while your editing, you could add a [ spoiler] tag around the code.
User avatar
Jack Walker
 
Posts: 3457
Joined: Wed Jun 06, 2007 6:25 pm

Post » Tue Jun 19, 2012 1:31 am

Add functions, to avoid re-typing or copy-&-pasting the same code again and again.
function Teleport(Actor source, ObjectReference destination)	TeleTarget.MoveTo(source)	Utility.Wait(0.2)	casterRef.MoveTo(destination)	SpellSwitch.SetValueInt(1)endfunction
This will be less error-prone, easier to read and maintain.

I'm not sure I understand. Even if I did that, I'd have to type that what you typed for each location individually, thus having the same thing I have now, only slightly changed words. Or am I getting this wrong?
User avatar
Britney Lopez
 
Posts: 3469
Joined: Fri Feb 09, 2007 5:22 pm

Post » Tue Jun 19, 2012 10:28 am

This adds a http://www.creationkit.com/Scripting_Tutorial_Using_Functions named Teleport, you can resuse that instead of all the code inside of it. Like this ...
...elseif Solitude == 1	TeleTarget.MoveTo(caster)	Utility.Wait(0.2)	casterRef.MoveTo(SolitudeCourtyard)	SpellSwitch.SetValueInt(1)elseif Solitude == 2	TeleTarget.MoveTo(caster)	Utility.Wait(0.2)	casterRef.MoveTo(SolitudeProudspire)	SpellSwitch.SetValueInt(1)...
would become
...elseif Solitude == 1	Teleport(caster, SolitudeCourtyard)elseif Solitude == 2	Teleport(caster, SolitudeProudspire)...
User avatar
Tamara Dost
 
Posts: 3445
Joined: Mon Mar 12, 2007 12:20 pm

Post » Tue Jun 19, 2012 5:41 am

I'm not sure I understand. Even if I did that, I'd have to type that what you typed for each location individually, thus having the same thing I have now, only slightly changed words. Or am I getting this wrong?

If you use that function you can essentially replace
if Whiterun == 0  TeleTarget.MoveTo(caster)   Utility.Wait(0.2)   ;Waits 0.2 seconds		 casterRef.MoveTo(WhiterunBreezehome)		  		 SpellSwitch.SetValueInt(1)elseif Whiterun == 1TeleTarget.MoveTo(caster)   Utility.Wait(0.2) 		 casterRef.MoveTo(WhiterunMarketplace) 		 SpellSwitch.SetValueInt(1)
with
if Whiterun == 0  Teleport(caster, WhiterunBreezehome)elseif Whiterun == 1  Teleport(caster, WhiterunMarketplace)
User avatar
Amanda savory
 
Posts: 3332
Joined: Mon Nov 27, 2006 10:37 am

Post » Tue Jun 19, 2012 2:15 am

Oh I see now. I'll try that and report back. Thanks for the help guys, I'm still learning all this Papyrus stuff, I easily get lost.
User avatar
Laura Ellaby
 
Posts: 3355
Joined: Sun Jul 02, 2006 9:59 am

Post » Tue Jun 19, 2012 6:41 am

Ok, I did it, and it works good! Ha awesome, thanks guys. But now, I gotta solve this. Basically, teleporting to Whiterun works. And I can teleport back to where I was. But when I try to teleport to ANY Solitude location, I get teleported to Whiterun == 0 location, which is WhiterunBreezehome.

Spoiler
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 SolitudeMainGate autoObjectReference property SolitudeCourtyard autoObjectReference property SolitudeProudspire autoObjectReference property SolitdueBluePalace 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 autoFunction Notification(string asNotificationText) native global   ;Used for debugging the script in gameFunction Teleport(Actor source, ObjectReference destination)			TeleTarget.MoveTo(source)		Utility.Wait(0.2)		casterRef.MoveTo(destination)		SpellSwitch.SetValueInt(1)endfunctionActor 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 Dawnstar   ;The Dawnstar locations question boxint mySpellSwitchEvent OnEffectStart(Actor akTarget, Actor akCaster)  Debug.Notification("Event Begin")	caster = akCaster		casterRef = (caster as ObjectReference)mySpellSwitch = SpellSwitch.GetValueInt()if mySpellSwitch == 1	Utility.Wait(0.3)  	SpellSwitch.SetValueInt(0)	 Debug.Notification("SpellSwitch Check")	Recall = QuestionMSGR.Show()	if Recall == 0	 casterRef.MoveTo(TeleTarget)endifelse  Debug.Notification("Mainbox Appeared")Utility.Wait(0.5)Mainbox = QuestionMSGM.Show()   ;Shows the main question box containing all the cities you can choose to teleport to  Debug.Notification("Mainbox Closed");Start of locations message box partif Mainbox == 0  		 Debug.Notification("Whiterun Message Box Appeared")	Whiterun = QuestionMSGWR.Show()   ;Shows Whiterun locations question box		 Debug.Notification("Whiterun Message Box Closed")	Utility.Wait(0.2)   ;Waits 0.2 secondselseif Mainbox == 1		 Debug.Notification("Solitude Message Box Appeared")	Solitude = QuestionMSGS.Show()   ;Shows Solitude locations question box		 Debug.Notification("Solitdue Message Box Closed")	Utility.Wait(0.2)   ;Waits 0.2 secondselseif Mainbox == 2		Debug.Notification("Dawnstar Message Box Appeared")   Dawnstar = QuestionMSGD.Show()   ;Shows Dawnstar locations question box		 Debug.Notification("Dawnstar Message Box Closed")   Utility.Wait(0.2)   ;Waits 0.2 secondsendif;End of locations message box part;Start of Whiterun Locations script partif Whiterun == 0Teleport(caster, WhiterunBreezehome)elseif Whiterun == 1Teleport(caster, WhiterunMarketplace)elseif Whiterun == 2Teleport(caster, WhiterunJorrvaskr)elseif Whiterun == 3Teleport(caster, WhiterunSkyforge)elseif Whiterun == 4Teleport(caster, WhiterunDragonsreach);End of Whiterun locations script part;Start of Solitude locations script partif Solitude == 0Teleport(caster, SolitudeMainGate)elseif Solitude == 1Teleport(caster, SolitudeCourtyard)elseif Solitude == 2Teleport(caster, SolitudeProudspire)elseif Solitude == 3Teleport(caster, SolitdueBluePalace);End of Solitude locations script part	endif  endifendifEndEvent
User avatar
Michael Korkia
 
Posts: 3498
Joined: Mon Jul 23, 2007 7:58 pm

Next

Return to V - Skyrim