prodlimen Posted April 9, 2014 Share Posted April 9, 2014 Hi there!. I'm working on a mod that gives Cerulean Robotics its own building model. The place has now 4 floors and an elevator to go to each of them. I edited the Gomorrah elevator script to get the elevator work and I did it :laugh:. However, I want to put a prerrequisite to use it, same as in Vault 22. I mean, the elevator is out of order and you need a repair skill of at least 50 to fix it and make it functional again. I tried to emulate the script from Vault 22 but it doesn't works, saying that there's a "Mismatched structure" and that line 35 is wrong. I'm not sure how to fix it, could you guys check it out and tell what's wrong?. I have the following items created: CeruleanRoboticsElevatorBrokenMsg (Message) CeruleanRoboticsElevatorBrokenNoSkillMsg (Message)CeruleanRoboticsElevatorDoor (Door)CeruleanRoboticsElevatorWorkingMsg (Msg) CeruleanRoboticsFreeform (Quest) CeruleanRoboticsVFreeformScript (Script) Due to the errors I can't save CeruleanRoboticsElevatorDoorScript (Script), Here's the syntaxis: scn CeruleanRoboticsElevatorDoorScript int Buttonint ScreenNumber ; 0 = No skill page; 1 = Fixing possible page; 2 = Floor selection page int ShouldSave ; 0 = Shouldn't save; 1 = Should autosave ref DoorOpener begin onActivate set DoorOpener to GetActionREF if DoorOpener.GetIsReference player if VFreeformCeruleanRobotics.ElevatorRepaired == 0if player.getav Repair >= 50ShowMessage CeruleanRoboticsElevatorBrokenMsgset ScreenNumber to 1elseif player.getav Repair < 50ShowMessage CeruleanRoboticsElevatorBrokenNoSkillMsgset ScreenNumber to 0endifelseif VFreeformCeruleanRobotics.ElevatorRepaired == 1ShowMessage CeruleanRoboticsElevatorWorkingMsgset ScreenNumber to 2endif ;-------------------------------------------------------------------------------------------------------------------------- begin GameMode set Button to GetButtonPressed if Button == 0 ; Do nothing elseif Button == 1if ScreenNumber == 1set VFreeformVault22.ElevatorRepaired to 1ShowMessage V22ElevatorWorkingMsgset ScreenNumber to 2player.rewardxp 100elseif ScreenNumber == 2player.MoveTo CeruleanFirstMarker if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0CraigBooneRef.MoveTo CeruleanRoboticsElevator1FFollowerMarkerelseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0ArcadeRef.MoveTo CeruleanRoboticsElevator1FFollowerMarkerelseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator1FFollowerMarkerelseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0RaulRef.MoveTo CeruleanRoboticsElevator1FFollowerMarkerelseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0LilyRef.MoveTo CeruleanRoboticsElevator1FFollowerMarkerelseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0VeronicaRef.MoveTo CeruleanRoboticsElevator1FFollowerMarkerendif if VNPCFollowers.RexHired && RexREF.Waiting == 0RexRef.MoveTo CeruleanRoboticsElevator1FRobotMarkerelseif VNPCFollowers.bEDEHiredif EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0EDE1Ref.MoveTo CeruleanRoboticsElevator1FRobotMarker;elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0EDE2Ref.MoveTo CeruleanRoboticsElevator1FRobotMarker;elseif EDE3Ref.GetDisabled == 0 && EDE3REF.waiting == 0EDE3Ref.MoveTo CeruleanRoboticsElevator1FRobotMarker;endifendifendif set ShouldSave to 1 elseif Button == 2 player.MoveTo CeruleanSecondMarker if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0CraigBooneRef.MoveTo CeruleanRoboticsElevator2FFollowerMarkerelseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0ArcadeRef.MoveTo CeruleanRoboticsElevator2FFollowerMarkerelseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator2FFollowerMarkerelseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0RaulRef.MoveTo CeruleanRoboticsElevator2FFollowerMarkerelseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0LilyRef.MoveTo CeruleanRoboticsElevator2FFollowerMarkerelseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0VeronicaRef.MoveTo CeruleanRoboticsElevator2FFollowerMarkerendif if VNPCFollowers.RexHired && RexREF.Waiting == 0RexRef.MoveTo CeruleanRoboticsElevator2FRobotMarkerelseif VNPCFollowers.bEDEHiredif EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0EDE1Ref.MoveTo CeruleanRoboticsElevator2FRobotMarker;elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0EDE2Ref.MoveTo CeruleanRoboticsElevator2FRobotMarker;elseif EDE3Ref.GetDisabled == 0 && EDE3REF.Waiting == 0EDE3Ref.MoveTo CeruleanRoboticsElevator2FRobotMarker;endifendif set ShouldSave to 1 elseif Button == 3player.MoveTo CeruleanThirdMarker if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0CraigBooneRef.MoveTo CeruleanRoboticsElevator3FFollowerMarkerelseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0ArcadeRef.MoveTo CeruleanRoboticsElevator3FFollowerMarkerelseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator3FFollowerMarkerelseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0RaulRef.MoveTo CeruleanRoboticsElevator3FFollowerMarkerelseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0LilyRef.MoveTo CeruleanRoboticsElevator3FFollowerMarkerelseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0VeronicaRef.MoveTo CeruleanRoboticsElevator3FFollowerMarkerendif if VNPCFollowers.RexHired && RexREF.Waiting == 0RexRef.MoveTo CeruleanRoboticsElevator3FRobotMarkerelseif VNPCFollowers.bEDEHiredif EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0EDE1Ref.MoveTo CeruleanRoboticsElevator3FRobotMarker;elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0EDE2Ref.MoveTo CeruleanRoboticsElevator3FRobotMarker;elseif EDE3Ref.GetDisabled == 0 && EDE3REF.Waiting == 0EDE3Ref.MoveTo CeruleanRoboticsElevator3FRobotMarker;endifendif set ShouldSave to 1 elseif Button == 4player.MoveTo CeruleanFourthMarker if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0CraigBooneRef.MoveTo CeruleanRoboticsElevator4FFollowerMarkerelseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0ArcadeRef.MoveTo CeruleanRoboticsElevator4FFollowerMarkerelseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator4FFollowerMarkerelseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0RaulRef.MoveTo CeruleanRoboticsElevator4FFollowerMarkerelseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0LilyRef.MoveTo CeruleanRoboticsElevator4FFollowerMarkerelseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0VeronicaRef.MoveTo CeruleanRoboticsElevator4FFollowerMarkerendif if VNPCFollowers.RexHired && RexREF.Waiting == 0RexRef.MoveTo CeruleanRoboticsElevator4FRobotMarkerelseif VNPCFollowers.bEDEHiredif EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0EDE1Ref.MoveTo CeruleanRoboticsElevator4FRobotMarker;elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0EDE2Ref.MoveTo CeruleanRoboticsElevator4FRobotMarker;elseif EDE3Ref.GetDisabled == 0 && EDE3REF.Waiting == 0EDE3Ref.MoveTo CeruleanRoboticsElevator4FRobotMarker;endifendif set ShouldSave to 1 endif if ShouldSave == 1AutoSaveset ShouldSave to 0endif end Many thanks for your time and help :laugh: Greetings, Prodlimen Link to comment Share on other sites More sharing options...
Gribbleshnibit8 Posted April 9, 2014 Share Posted April 9, 2014 Please repost that script using the [code][/code]tags, the little <> in the editing bar. Link to comment Share on other sites More sharing options...
prodlimen Posted April 10, 2014 Author Share Posted April 10, 2014 Sure thing pal, here it is: [code] scn CeruleanRoboticsElevatorDoorScript int Buttonint ScreenNumber ; 0 = No skill page ; 1 = Fixing possible page ; 2 = Floor selection page int ShouldSave ; 0 = Shouldn't save ; 1 = Should autosave ref DoorOpener begin onActivate set DoorOpener to GetActionREF if DoorOpener.GetIsReference player if VFreeformCeruleanRobotics.ElevatorRepaired == 0 if player.getav Repair >= 50 ShowMessage CeruleanRoboticsElevatorBrokenMsg set ScreenNumber to 1 elseif player.getav Repair < 50 ShowMessage CeruleanRoboticsElevatorBrokenNoSkillMsg set ScreenNumber to 0 endif elseif VFreeformCeruleanRobotics.ElevatorRepaired == 1 ShowMessage CeruleanRoboticsElevatorWorkingMsg set ScreenNumber to 2 endif ;-------------------------------------------------------------------------------------------------------------------------- begin GameMode set Button to GetButtonPressed if Button == 0 ; Do nothing elseif Button == 1 if ScreenNumber == 1 set VFreeformVault22.ElevatorRepaired to 1 ShowMessage V22ElevatorWorkingMsg set ScreenNumber to 2 player.rewardxp 100 elseif ScreenNumber == 2 player.MoveTo CeruleanFirstMarker if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0 CraigBooneRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker elseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0 ArcadeRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker elseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0 RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker elseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0 RaulRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker elseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0 LilyRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker elseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0 VeronicaRef.MoveTo CeruleanRoboticsElevator1FFollowerMarker endif if VNPCFollowers.RexHired && RexREF.Waiting == 0 RexRef.MoveTo CeruleanRoboticsElevator1FRobotMarker elseif VNPCFollowers.bEDEHired if EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0 EDE1Ref.MoveTo CeruleanRoboticsElevator1FRobotMarker; elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0 EDE2Ref.MoveTo CeruleanRoboticsElevator1FRobotMarker; elseif EDE3Ref.GetDisabled == 0 && EDE3REF.waiting == 0 EDE3Ref.MoveTo CeruleanRoboticsElevator1FRobotMarker; endif endif endif set ShouldSave to 1 elseif Button == 2 player.MoveTo CeruleanSecondMarker if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0 CraigBooneRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker elseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0 ArcadeRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker elseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0 RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker elseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0 RaulRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker elseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0 LilyRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker elseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0 VeronicaRef.MoveTo CeruleanRoboticsElevator2FFollowerMarker endif if VNPCFollowers.RexHired && RexREF.Waiting == 0 RexRef.MoveTo CeruleanRoboticsElevator2FRobotMarker elseif VNPCFollowers.bEDEHired if EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0 EDE1Ref.MoveTo CeruleanRoboticsElevator2FRobotMarker; elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0 EDE2Ref.MoveTo CeruleanRoboticsElevator2FRobotMarker; elseif EDE3Ref.GetDisabled == 0 && EDE3REF.Waiting == 0 EDE3Ref.MoveTo CeruleanRoboticsElevator2FRobotMarker; endif endif set ShouldSave to 1 elseif Button == 3 player.MoveTo CeruleanThirdMarker if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0 CraigBooneRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker elseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0 ArcadeRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker elseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0 RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker elseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0 RaulRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker elseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0 LilyRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker elseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0 VeronicaRef.MoveTo CeruleanRoboticsElevator3FFollowerMarker endif if VNPCFollowers.RexHired && RexREF.Waiting == 0 RexRef.MoveTo CeruleanRoboticsElevator3FRobotMarker elseif VNPCFollowers.bEDEHired if EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0 EDE1Ref.MoveTo CeruleanRoboticsElevator3FRobotMarker; elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0 EDE2Ref.MoveTo CeruleanRoboticsElevator3FRobotMarker; elseif EDE3Ref.GetDisabled == 0 && EDE3REF.Waiting == 0 EDE3Ref.MoveTo CeruleanRoboticsElevator3FRobotMarker; endif endif set ShouldSave to 1 elseif Button == 4 player.MoveTo CeruleanFourthMarker if VNPCFollowers.bBooneHired && CraigBooneREF.Waiting == 0 CraigBooneRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker elseif VNPCFollowers.ArcadeHired && ArcadeREF.Waiting == 0 ArcadeRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker elseif VNPCFollowers.bCassHired && RoseOfSharonCassidyREF.Waiting == 0 RoseofSharonCassidyRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker elseif VNPCFollowers.RaulHired && RaulREF.Waiting == 0 RaulRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker elseif VNPCFollowers.bLilyHired && LilyREF.Waiting == 0 LilyRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker elseif VNPCFollowers.bVeronicaHired && VeronicaREF.Waiting == 0 VeronicaRef.MoveTo CeruleanRoboticsElevator4FFollowerMarker endif if VNPCFollowers.RexHired && RexREF.Waiting == 0 RexRef.MoveTo CeruleanRoboticsElevator4FRobotMarker elseif VNPCFollowers.bEDEHired if EDE1Ref.GetDisabled == 0 && EDE1REF.Waiting == 0 EDE1Ref.MoveTo CeruleanRoboticsElevator4FRobotMarker; elseif EDE2Ref.GetDisabled == 0 && EDE2REF.Waiting == 0 EDE2Ref.MoveTo CeruleanRoboticsElevator4FRobotMarker; elseif EDE3Ref.GetDisabled == 0 && EDE3REF.Waiting == 0 EDE3Ref.MoveTo CeruleanRoboticsElevator4FRobotMarker; endif endif set ShouldSave to 1 endif if ShouldSave == 1 AutoSave set ShouldSave to 0 endif end [/code] Link to comment Share on other sites More sharing options...
jazzisparis Posted April 12, 2014 Share Posted April 12, 2014 You are missing an end at the end of the OnActivate block. All the conditions and MoveTo calls on followers are redundant and you can remove them. Calling MoveTo on the player automatically applies on all party members currently following the player. Link to comment Share on other sites More sharing options...
Recommended Posts