viewNumber is discarded from memory.
viewNumber: a number, 0-255, specifying which view resource to remove from memory
viewNumber: a variable, v0-v255, whose value specifies which view resource to remove from memory
- if the view is not already loaded, the game will crash with a view not loaded error
- if the view is assigned to an object when it is discarded, the game may crash or exhibit other odd behavior; it may not even generate an error message
- resources must be discarded in exactly the reverse order that they were loaded, or subsequent discard.view commands may generate a view not loaded error, even if the view has actually been loaded; see Memory and Script for more details on this issue
discard.view.vcommands add to the script buffer; this can cause a script buffer overflow error.
The following example uses
discard.view to remove view 203 from memory:
The next example uses
discard.view.v to accomplish the same task:
v100 = 203;
Some of the text in the article is taken from the AGI Studio help file.