Jump to content

Code Monkeys, please fix my script


Quetzlsacatanango

Recommended Posts

Maybe it's something obvious, if so not obvious enough.

This script is on a door.

When I try to save I get an error:

Error line 5 (first line in the if/endif block)

Syntax error

Reference not allowed in this context

 

Problem is I don't see where I included a reference.

 

scn aaaQCCStoreDoorScript

Begin OnActivate

if getquestvariable aaaQCCArtifactHunt.goosebusy == 1
    showmessage aaaQCCMMClosedMessage
elseif getquestvariable aaaQCCArtifactHunt.goosebusy == 0
    activate
endif

End

 

Thanks in advance.

 

edit: Thanks but no thanks, code monkeys.

Apparently what you don't need in this context is the getquestvariable function. Taking that out allows me to save. Whether it works or not, the future will tell.

Edited by Quetzlsacatanango
Link to comment
Share on other sites

Try:

 

scn aaaQCCStoreDoorScript

 

Begin OnActivate

 

if getstage aaaQCCArtifactHunt.goosebusy != 10 ;shows that player is not on the current stage then displays closed message

showmessage aaaQCCMMClosedMessage

elseif getstage aaaQCCArtifactHunt.goosebusy == 10 ;player is on correct stage

DoorREF.Unlock ;I assume here that you want to unlock the door. then you would use "DoorREF.Unlock"

endif

 

End

 

I think this way is asking if you are on a specific stage. If so then this will unlock the door only once the player has reached the correct stage.

 

I am very new to scripting. I hope this works/helps you out.

Link to comment
Share on other sites

Just use:

 

if aaaQCCArtifactHunt.goosebusy == 1

 

showmessage, etc

 

 

 

That's all you need.

 

If you like, just PM me script problems directly, as that's one of the thing's I'm good at.

Edited by rjhelms84
Link to comment
Share on other sites

  • Recently Browsing   0 members

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