Death Script with an "if" has missing EOF

Post » Thu Jun 27, 2013 10:13 pm

I'm trying to make a script that advances a quest stage when an actor dies only if he's killed on the correct stage (stage 70, in this case). Otherwise, I want it to set it to a quest stage that fails the quest.

Here's what I have so far:

if (GetStage().MANNMQ==70)    Event OnDeath(Actor Killer)                  MANNMQ.SetStage(80)                  MANNMQ.SetObjectiveDisplayed(80)                  MANNMQ.SetObjectiveCompleted(70)   EndEventElse       Event OnDeath(Actor Killer)                  MANNMQ.SetStage(200)       EndEventEndif

The problem is that it's telling me I have a "missing EOF at 'if'". I have no idea what an EOF is or where it would go. Does anyone know what's wrong?

User avatar
Kortniie Dumont
 
Posts: 3428
Joined: Wed Jan 10, 2007 7:50 pm

Post » Fri Jun 28, 2013 11:39 am

You're putting events inside of your If statement when it should be the opposite way around...

Quest Property MANNMQ Auto  Event OnDeath(Actor akKiller)    if MANNMQ.GetStage() == 70        MANNMQ.SetStage(80)        ;other stuff    else        MANNMQ.SetStage(200)    endIfendEvent
User avatar
April
 
Posts: 3479
Joined: Tue Jun 20, 2006 1:33 am

Post » Fri Jun 28, 2013 5:56 am

Thanks, it worked :D

Just one question: I noticed you put

Actor akKiller

on the first line as opposed to just

Actor Killer

What's the difference?

User avatar
Cameron Wood
 
Posts: 3384
Joined: Wed Oct 31, 2007 3:01 pm

Post » Fri Jun 28, 2013 9:49 am


Three is no difference. You can name it whatever you want. I just like to follow bethesda's naming system.

a : Argument :: b : Bool :: f : Float :: i : Int :: p : Pointer :: s : String :: k : Form/Alias :: u : Unsigned
User avatar
Milad Hajipour
 
Posts: 3482
Joined: Tue May 29, 2007 3:01 am


Return to V - Skyrim