Tracked down in debugger to line15 column 1, looked at some other scripts and figured it out.
# Globals
ShowTDC = True
#Page attack periscope.py
from menu import *
def InitializeScript():
[TAB] Menu.PageActivated += Menu_PageActivated
[TAB] Menu.PageDeactivated += Menu_PageDeactivated
[TAB] Menu_PageActivated( Pageattackperiscope )
def StartGame():
[TAB] pass
def Menu_PageActivated( page ):
[TAB] if page == Pageattackperiscope:
[TAB] [TAB] global ShowTDC
[TAB] if ShowTDC:
[TAB] [TAB] from PageTDC import PageTDC
[TAB] [TAB] PageTDC.Visible = True
def Menu_PageDeactivated( page ):
[TAB] if page == Pageattackperiscope:
[TAB] [TAB] global ShowTDC
[TAB] if ShowTDC:
[TAB] [TAB] from PageTDC import PageTDC
[TAB] [TAB] PageTDC.Visible = False
def EndGame():
[TAB] pass
def UnloadScript():
[TAB] Menu.PageActivated -= Menu_PageActivated
[TAB] Menu.PageDeactivated -= Menu_PageDeactivated
should globals be double "tabbed"? it works now but then the TDC stays when I exit station
the indentations listed in the tutorial seem wrong to me...
Last edited by Jace11; 05-05-13 at 05:36 PM.
|