Jump to content

I know I messed something up but I still would like help.


ToxicStarSlayer0TSS0

Recommended Posts

This is the script I'm using. I havent coded in a while on CK so I would just like some help here to see what I did wrong.
The Errors are: required (...)+ loop did not match anything at input 'If'
and: mismatched input 'EndFunction' expecting ENDIF

Scriptname _BSS_FlyToLoc extends ObjectReference
{This is a script used in the BSSS to allow the player fly to their desired location.}
Message Property _BSS_ChoseLocMenu Auto
ObjectReference Property _BSS_BlackreachHanger Auto
ObjectReference Property _BSS_Blackreach Auto
ObjectReference Property _BSS_Riften Auto
ObjectReference Property _BSS_TheRiftShip Auto
Event OnActivate(ObjectReference akActionRef)
_BSS_ChoseLocMenu()
EndEvent
Here is the script I'm using, I havent coded on CK for a while so I just would like to know what I messed up on.
The errors are :required (...)+ loop did not match anything at input 'If'
And :mismatched input 'EndFunction' expecting ENDIF
Function _BSS_ChoseLocMenu(Int aiButton = 0)
aiButton = _BSS_ChoseLocMenu.show()
If aiButton == 0
ElseIf aiButton == 1
If (_BSS_Blackreach.IsDisabled())
_BSS_BlackreachHanger.Enable()
_BSS_Blackreach.Enable()
Else
debug.notification("You're already at the Blackreach Hanger!")
EndIf
Else If aiButton == 2
If (_BSS_Riften.IsDisabled())
_BSS_Riften.Enable()
_BSS_TheRiftShip.Enable()
Else
debug.notification("You've already landed in the Rift!")
EndIf
EndIf
EndFunction

Page loaded in: 1.164 seconds
Link to comment
Share on other sites

 

The compiler will tell you the line in the script where the error occurs. Can you see it ?

Else If aiButton == 2

 

Just like Ghaunadaur said - change the "Else If" to "ElseIf" in that line (remove the space between them) and you're good to go.

I ran it through the Papyrus Compiler and it was ok, no errors.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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