Quetzlsacatanango Posted March 14, 2012 Share Posted March 14, 2012 (edited) 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 errorReference 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 March 14, 2012 by Quetzlsacatanango Link to comment Share on other sites More sharing options...
rotarydanimal Posted March 14, 2012 Share Posted March 14, 2012 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 More sharing options...
rickerhk Posted March 15, 2012 Share Posted March 15, 2012 Yeah the getquestvariable function is just for conditions. Link to comment Share on other sites More sharing options...
rjhelms84 Posted March 15, 2012 Share Posted March 15, 2012 (edited) 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 March 15, 2012 by rjhelms84 Link to comment Share on other sites More sharing options...
Recommended Posts