From AGI Wiki
Revision as of 17:34, 24 April 2019 by Andrew Korson (Talk | contribs) (Possible Errors)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The command enables the use of menus after they have been created with the and commands.



This command commits a previously created menu system to memory by setting the the room.0 memory pointer. When the menu system is submitted, AGI sets the first item of the first menu to the current item.

Once a menu system has been submitted, it cannot be modified. No menus or menu items can be added, modified or deleted. Future calls to are ignored if a menu has already been submitted.

See the Menus in AGI topic for additional information on how menus work in AGI.

Possible Errors

Do NOT call this command until a menu system has been created. If called without first creating a menu, AGI will point to an invalid memory address and crash AGI if you later try to access the menu with the menu.input command.

Do NOT call more than once. AGI does not check if a menu has already been submitted when the command runs, and it will reset the room.0 memory pointer again, which will waste memory, and could lead to memory overflow.


[ build a simple menu system"Info");"About   ", c0);"Help    ", c1);"File");"Save Game      <F5>", c2);"Restore Game   <F7>", c3);"-------------------", c20);"Restart Game   <F9>", c4);"-------------------", c20);"Quit        <Alt Z>", c5);
[ disable the separators
[ submit menu to agi;

Technical Information

Required Interpreter Version: Available in version 2.272 and above.
Byte-Code Value: 158 (0x9E hex)

See Also

Player Input Commands
Menus in AGI