Okay, so I am trying to create a cheat menu for my mod, so I can choose many options by reading a book. Standard stuff.
There are more than 10 options, so I need to make more than one menu. The last item in menu 1 is "next", which should bring the menu2, element 0 in menu2 is "previous", which would bring back menu1 and so for.
The code looks something like that:
Scriptname CheatBookScript extends ObjectReference
Message Property Menu1 Auto
Message Property Menu2 Auto
Event OnRead()
Menu1()
EndEvent
Function Menu1(int aibutton = 0)
aibutton=Menu1.show()
if aibutton==0
elseif aibutton ==1
;options 2-8 here...
elseif aibutton ==9
Menu2()
EndIf
EndFunction
Function Menu2(int aibutton2 = 0)
aibutton2=Menu2.show()
if aibutton2==0
menu1()
elseif aibutton2 ==1
;options 2-8 here...
elseif aibutton2 ==9
EndIf
EndFunction
Except, it doesn't work. When I click the "next" button, the game does nothing, staying in menu1. Why?