L3DT users' wiki
Large 3D terrain generator

assert

Description

Test a boolean value, and if false, display an error message and halt script execution.

Function prototype

void assert <bool:Condition> <string:Message>

Arguments

Name Type Comment
Condition bool The boolean value to be tested.
Message string The string of text to be displayed if Condition is false.

Return value

None.

Example

// create an integer
new int "i"

// set it to 9
set i 9

// and assert if 'i' is not greater than 10
assert <zs:isgt i 10> "'i' must be greater than 10"

Comments

None.

See also

 
plugins/general/zeoscript/reference/functions/assert.txt · Last modified: 2017/08/31 07:03 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki