Jump to content

Missing EOF baffles me


Recommended Posts

I've tried several routes for this script but it always fails with...

(68,0): missing EOF at 'If'
Script is nowhere near finished but can't continue with this error keep happening.

 

ObjectReference Property StartFuseMarker Auto
ObjectReference Property RocksMarker Auto
ObjectReference Property ExpMarker Auto
GlobalVariable Property PrevActi Auto; has object already been activated elsewhere 0-no 1-yes
Explosion Property MyExp Auto
Explosion Property MyExp2 Auto
Int Property ObjToDstry Auto; user enter value of current object – see comments
Light Property HasTorch Auto
MagicEffect Property MyEff Auto
Message Property Greet Auto
Message Property NeedGPowder Auto
Message Property NeedSewKit Auto
Message Property NeedGunSew Auto
Message Property EquipTorch Auto
Message Property NeedFlame Auto
Message Property ExpMenu Auto
Message Property NotFire Auto; cannot use fire message
MiscObject Property GPowder Auto
MiscObject Property SewKitAsFuse Auto
Sound Property ExpSND Auto

; ObjToBeDest values associated with destructible items
; 0 Solid structures that can only be blown up – rocks, solid wood
; 1 Objects that can be ignited with kindling or accelerant – log piles
; 2 Objects that are easily ignitable – paper, material, oil

Auto State Waiting
Event OnActivate(ObjectReference akActionRef)
if (akActionRef == Game.GetPlayer())
Int iButtonA = Greet.Show() ; Shows first menu
; check to see if player Literally Has Nothing useful
If iButtonA == 0; explosives chosen
ExplosivesOptions()
EndIf
If (iButtonA == 1) && ObjToDstry == 0; fire chosen but won’t work on this object so don’t go to fire menu
NotFire.show()
GoToState("Waiting")
else
FireOptions()
EndIf

If iButtonA == 2; other chosen
OtherOptions()
EndIf

GoToState("Waiting")

EndIf
debug.notification("Script Ended")
EndEvent
EndState
;----------------------------------------------------------------------
Function ExplosivesOptions()
debug.notification("Explosives Chosen")
Int iButtonExp = ExpMenu.Show(); shows explosives menu-menu only shows available inventory items
If iButtonExp == 0; Button 0 is shown because player has gunpowder
debug.notification("Gunpowder Chosen")
EndIf
; check for fuse
if Game.GetPlayer().GetItemCount(SewKitAsFuse) < 1
debug.notification("You Don’t Have Anything To Use As A Fuse")
; player has nothing to use as fuse
EndIf
EndFunction

If Game.GetPlayer().GetItemCount(SewingKitAsFuse) > 0
debug.notification("Sewing Kit Thread Used As Fuse")
EndIf; player has items required for explosion
Game.GetPlayer().RemoveItem(GPowder, 1)
Explosion(); send to the actual explosion

Function Explosion(); actual Explosion
debug.notification("BANG!")
EndFunction


Function FireOptions()
debug.notification("Fire Chosen")
EndFunction

Function OtherOptions()
debug.notification("Other Chosen")
EndFunction

 

Link to comment
Share on other sites

You have the following lines outside the " Event " or your " Function " ( i didn't read on depth your script to understand what's trying to do ).

If Game.GetPlayer().GetItemCount(SewingKitAsFuse) > 0
   debug.notification("Sewing Kit Thread Used As Fuse")
EndIf; player has items required for explosion
    Game.GetPlayer().RemoveItem(GPowder, 1)
Explosion(); send to the actual explosion
Link to comment
Share on other sites

  • Recently Browsing   0 members

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