Jump to content

Tiny problem.


SupermassiveBlackHole

Recommended Posts

Hi,

 

As you know, scripting in the NV GECK is kinda bugged, and doesn't let you save it if there's a problem in it. My problem is, my script wont save as there is a problem, I can't identify it though. It's a script for a lightswitch.

 

scn 000ACTIPBSLightswitch01SCRIPT

 

Begin OnActivate

 

if 000LGHTPBSCeilingLight256REF.GetDisabled == 0

000LGHTPBSCeilingLight256REF.disable

endif

else

000LGHTPBSCeilingLight256REF.enable

endif

End

 

It should be easy to fix, I'm a dummy with scripting.

 

Cheers.

Link to comment
Share on other sites

scn 000ACTIPBSLightswitch01SCRIPT    ---------------This line is fine

Begin OnActivate     ---------------This line is fine

 if 000LGHTPBSCeilingLight256REF.GetDisabled == 0          ---------------This line is fine
         000LGHTPBSCeilingLight256REF.disable                ---------------This line is not needed. You are checking it the item is disabled and it is this disables the item again.

 endif           ------------------This is your problem, endif ends the entire if statement. it just needs to be removed.

 else        ---------------This line is fine
              000LGHTPBSCeilingLight256REF.enable          ---------------This line is fine
 endif         ---------------This line is fine

End        ---------------This line is fine

 

You may also have a problem with your naming of the reference. I know for some objects you cannot use a number as the first character for a reference name.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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