Validate
The validation table contains a suite of functions that can provide input validation for other scripts. A validation function, when provided with a value, checks that value and returns true
if it passes the check. If the value does not pass the check then the validation function throws a script_error
containing a descriptive error message and return false
.
The diference between calling a validation function and calling one of the global Lua Type Checking
functions is that the validation function will automatically throw a script error if the validation fails.
Loaded in Campaign | |
Loaded in Battle | |
Loaded in Frontend |
The functions in this section can be used to check whether variables are a built-in type.
-
validate.is_nil(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is notnil
. If the supplied value is nil thentrue
is returned.Parameters:
1
value
value
Returns:
value is nilboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 1866
-
validate.is_number(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not anumber
. If the supplied value is a number thentrue
is returned.Parameters:
1
value
value
Returns:
value is a numberboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 1873
-
validate.is_function(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not afunction
. If the supplied value is a function thentrue
is returned.Parameters:
1
value
value
Returns:
value is a functionboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 1880
-
validate.is_string(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not astring
. If the supplied value is a string thentrue
is returned.Parameters:
1
value
value
Returns:
value is a stringboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 1887
-
validate.is_boolean(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not aboolean
. If the supplied value is a boolean thentrue
is returned.Parameters:
1
value
value
Returns:
value is a booleanboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 1894
-
validate.is_boolean_or_nil(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not aboolean
ornil
. If the supplied value is a boolean or nil thentrue
is returned.Parameters:
1
value
value
Returns:
value is a booleanboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 1901
-
validate.is_table(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not atable
. If the supplied value is a table thentrue
is returned.Parameters:
1
value
value
Returns:
value is a tableboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 1915
-
validate.is_userdata(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is notuserdata
. If the supplied value is userdata thentrue
is returned.Parameters:
1
value
value
Returns:
value is userdataboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 1922
The functions in this section can be used to check whether variables are specific arrangements of built-in types.
-
validate.is_integer(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not an integer value. If the supplied value is an integer thentrue
is returned.Parameters:
1
value
value
Returns:
value is an integerboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 1944
-
validate.is_positive_number(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a number greater than zero. If the supplied value is a positive number thentrue
is returned.Parameters:
1
value
value
Returns:
value is a positive numberboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 1951
-
validate.is_non_negative_number(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a number greater than or equal to zero. If the supplied value is a non-negative number thentrue
is returned.Parameters:
1
value
value
Returns:
value is a non-negative numberboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 1958
-
validate.is_non_empty_table(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a non-empty table. If the supplied value is considered to be a non-empty indexed table thentrue
is returned. See alsovalidate.is_non_empty_table_indexed
which should be used for numerically-indexed tables in place of this function.Parameters:
1
value
value
Returns:
value is a non-empty tableboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 1965
-
validate.is_non_empty_table_indexed(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a non-empty indexed table. An indexed table contains values stored in elements with keys which are ascending integer numbers, starting at 1. Values stored at keys that are not ascending integers are not queried by this test, so a table that contains only values stored in elements with string keys will not count as a "non empty table indexed". If the supplied value is considered to be a non-empty indexed table thentrue
is returned.Parameters:
1
value
value
Returns:
value is a non-empty indexed tableboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 1980
-
validate.is_table_of_strings(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a numerically-indexed table of strings. If the supplied value is a table of strings thentrue
is returned.Parameters:
1
value
value
Returns:
value is a table of stringsboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 1994
-
validate.is_string_or_table_of_strings(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a string, or a numerically-indexed table of strings. If the supplied value is either of these value types thentrue
is returned.Parameters:
1
value
value
Returns:
value is a string/table of stringsboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2008
-
validate.is_table_of_strings_allow_empty(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not an empty table or a numerically-indexed table of strings. If the supplied value is either of these value types thentrue
is returned.Parameters:
1
value
value
Returns:
value is a string/table of stringsboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2022
-
validate.is_condition(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a function or the boolean valuetrue
. Event conditions in the scripting library commonly adhere to this format, where an event is received and the condition must either be a function that returns a result, or be the boolean value true. If the supplied value is a condition thentrue
is returned.Parameters:
1
value
value
Returns:
value is a function or trueboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2036
The functions in this section can be used to check whether variables are of a code type that is not built-in to Lua but common across all our game environments.
-
validate.is_eventcontext(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not an event context. If the supplied value is an event context thentrue
is returned.Parameters:
1
value
value
Returns:
value is an event contextboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2053
-
validate.is_uicomponent(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a uicomponent. If the supplied value is a uicomponent thentrue
is returned.Parameters:
1
value
value
Returns:
value is an event contextboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2060
-
validate.is_component(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a component memory address. If the supplied value is a component memory address thentrue
is returned.Parameters:
1
value
value
Returns:
value is a component memory addressboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2067
The functions in this section can be used to check whether variables are of a userdata code type that is provided in the campaign environment. In certain cases the function also works in battle.
-
validate.is_null(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign null script interface. If the supplied value is a null script interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a null script interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2089
-
validate.is_model(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign model interface. If the supplied value is a model interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a model interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2096
-
validate.is_world(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign world interface. If the supplied value is a world interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a world interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2103
-
validate.is_faction(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign faction interface. If the supplied value is a faction interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a faction interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2110
-
validate.is_factionlist(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign faction list interface. If the supplied value is a faction list interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a faction list interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2117
-
validate.is_character(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign character interface. If the supplied value is a character interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a character interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2124
-
validate.is_familymember(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign family member interface. If the supplied value is a family member interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a family member interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2131
-
validate.is_characterlist(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign character list interface. If the supplied value is a character list interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a character list interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2138
-
validate.is_regionmanager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign region manager interface. If the supplied value is a region manager interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a region manager interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2145
-
validate.is_region(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign region interface. If the supplied value is a region interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a region interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2152
-
validate.is_regiondata(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign region data interface. If the supplied value is a region data interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a region data interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2159
-
validate.is_province(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign province interface. If the supplied value is a province interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a province interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2166
-
validate.is_factionprovince(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign faction province interface. If the supplied value is a faction province interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a faction province interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2173
-
validate.is_regionlist(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign region list interface. If the supplied value is a region list interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a region list interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2180
-
validate.is_garrisonresidence(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign garrison residence interface. If the supplied value is a garrison residence interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a garrison residence interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2187
-
validate.is_settlement(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign settlement interface. If the supplied value is a settlement interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a settlement interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2194
-
validate.is_slot(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign slot interface. If the supplied value is a slot interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a slot interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2201
-
validate.is_slotlist(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign slot list interface. If the supplied value is a slot list interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a slot list interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2208
-
validate.is_militaryforce(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign military force interface. If the supplied value is a military force interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a military force interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2215
-
validate.is_militaryforcelist(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign military force list interface. If the supplied value is a military force list interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a military force list interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2222
-
validate.is_unit(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a unit interface. If the supplied value is a unit interface thentrue
is returned. This works in both campaign and battle on their respective unit object types.Parameters:
1
value
value
Returns:
value is a unit interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2229
-
validate.is_unitlist(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign unit list interface. If the supplied value is a unit list interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a unit list interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2236
-
validate.is_pendingbattle(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign pending battle interface. If the supplied value is a pending battle interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a pending battle interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2243
-
validate.is_campaignmission(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign mission interface. If the supplied value is a mission interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a mission interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2250
-
validate.is_campaignai(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign ai interface. If the supplied value is a campaign ai interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a campaign ai interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2257
-
validate.is_buildinglist(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign building list interface. If the supplied value is a building list interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a building list interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2264
-
validate.is_building(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a building interface. If the supplied value is a building interface thentrue
is returned. This works in both campaign and battle on their respective object types.Parameters:
1
value
value
Returns:
value is a building interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2271
-
validate.is_foreignslotmanager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a foreign slot manager interface. If the supplied value is a foreign slot manager interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a foreign slot manager interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2278
-
validate.is_foreignslot(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a foreign slot interface. If the supplied value is a foreign slot interface thentrue
is returned.Parameters:
1
value
value
Returns:
value is a foreign slot interfaceboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2285
The functions in this section can be used to check whether variables are of a userdata code type that is provided in the battle environment. In certain cases functions are shared with campaign, in which case they are listed with the campaign type-checking functions.
-
validate.is_battlesoundeffect(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a battle sound effect. If the supplied value is a battle sound effect thentrue
is returned.Parameters:
1
value
value
Returns:
value is a battle sound effectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2306
-
validate.is_battle(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a battle object. If the supplied value is a battle object thentrue
is returned.Parameters:
1
value
value
Returns:
value is a battle objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2313
-
validate.is_alliances(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not an alliances collection object. If the supplied value is an alliances object thentrue
is returned.Parameters:
1
value
value
Returns:
value is an alliances objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2320
-
validate.is_alliance(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not an alliance object. If the supplied value is an alliance object thentrue
is returned.Parameters:
1
value
value
Returns:
value is an alliance objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2327
-
validate.is_armies(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not an armies collection object. If the supplied value is an armies object thentrue
is returned.Parameters:
1
value
value
Returns:
value is an armies objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2334
-
validate.is_army(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not an army object. If the supplied value is an army object thentrue
is returned.Parameters:
1
value
value
Returns:
value is an army objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2341
-
validate.is_units(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a units collection object. If the supplied value is a units object thentrue
is returned.Parameters:
1
value
value
Returns:
value is a units objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2348
-
validate.is_unitcontroller(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a unitcontroller object. If the supplied value is a unitcontroller object thentrue
is returned.Parameters:
1
value
value
Returns:
value is a unitcontroller objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2355
-
validate.is_vector(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a battle vector object. If the supplied value is a vector object thentrue
is returned.Parameters:
1
value
value
Returns:
value is a battle vector objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2362
-
validate.is_buildings(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a buildings collection object. If the supplied value is a buildings collection object thentrue
is returned.Parameters:
1
value
value
Returns:
value is a buildings collection objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2369
-
validate.is_subtitles(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a subtitles object. If the supplied value is a subtitles object thentrue
is returned.Parameters:
1
value
value
Returns:
value is a subtitles objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2376
The functions in this section can be used to check whether variables are of a script data type that is provided in multiple game environments.
-
validate.is_core(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a core script object. If the supplied value is a core object thentrue
is returned.Parameters:
1
value
value
Returns:
value is a core objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2400
-
validate.is_timermanager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a timer manager script object. If the supplied value is a timer manager thentrue
is returned.Parameters:
1
value
value
Returns:
value is a timer manager objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2407
-
validate.is_scriptmessager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a script messager object. If the supplied value is a script messager thentrue
is returned.Parameters:
1
value
value
Returns:
value is a script messager objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2414
-
validate.is_customcontext(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a custom event context object. If the supplied value is a custom context thentrue
is returned.Parameters:
1
value
value
Returns:
value is a script messager objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2421
-
validate.is_objectivesmanager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not an objectives manager script object. If the supplied value is an objectives manager thentrue
is returned.Parameters:
1
value
value
Returns:
value is an objectives manager objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2428
-
validate.is_infotextmanager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not an infotext manager script object. If the supplied value is an infotext manager thentrue
is returned.Parameters:
1
value
value
Returns:
value is an infotext manager objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2435
-
validate.is_linkparser(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a link parser script object. If the supplied value is a link parser thentrue
is returned.Parameters:
1
value
value
Returns:
value is a link parser objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2442
-
validate.is_tooltiplistener(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a tooltip listener script object. If the supplied value is a tooltip listener thentrue
is returned.Parameters:
1
value
value
Returns:
value is a tooltip listener objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2449
-
validate.is_tooltippatcher(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a tooltip patcher script object. If the supplied value is a tooltip patcher thentrue
is returned.Parameters:
1
value
value
Returns:
value is a tooltip patcher objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2456
-
validate.is_helppagemanager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a help page manager script object. If the supplied value is a help page manager thentrue
is returned.Parameters:
1
value
value
Returns:
value is a help page manager objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2463
-
validate.is_helppage(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a help page script object. If the supplied value is a help page thentrue
is returned.Parameters:
1
value
value
Returns:
value is a help page objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2470
-
validate.is_textpointer(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a text pointer script object. If the supplied value is a text pointer thentrue
is returned.Parameters:
1
value
value
Returns:
value is a help page objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2477
-
validate.is_activepointer(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not an active pointer script object. If the supplied value is an active pointer thentrue
is returned.Parameters:
1
value
value
Returns:
value is an active pointer objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2484
-
validate.is_scriptedtour(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a scripted tour object. If the supplied value is a scripted tour thentrue
is returned.Parameters:
1
value
value
Returns:
value is a scripted tour objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2491
-
validate.is_navigabletour(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a navigable tour object. If the supplied value is a navigable tour thentrue
is returned.Parameters:
1
value
value
Returns:
value is a navigable tour objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2498
-
validate.is_navigabletoursection(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a navigable tour section object. If the supplied value is a navigable tour section thentrue
is returned.Parameters:
1
value
value
Returns:
value is a navigable tour section objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2505
-
validate.is_movieoverlay(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a movie overlay script object. If the supplied value is a movie overlay thentrue
is returned.Parameters:
1
value
value
Returns:
value is a movie overlay objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2512
-
validate.is_windowedmovieplayer(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a windowed movie player script object. If the supplied value is a windowed movie player thentrue
is returned.Parameters:
1
value
value
Returns:
value is a windowed movie player objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2519
-
validate.is_topicleader(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a topic leader script object. If the supplied value is a topic leader thentrue
is returned.Parameters:
1
value
value
Returns:
value is a topic leader objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2526
The functions in this section can be used to check whether variables are of a script data type that is provided in campaign.
-
validate.is_campaignmanager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign manager script object. If the supplied value is a campaign manager thentrue
is returned.Parameters:
1
value
value
Returns:
value is a campaign manager script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2550
-
validate.is_campaigncutscene(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign cutscene script object. If the supplied value is a campaign cutscene thentrue
is returned.Parameters:
1
value
value
Returns:
value is a campaign cutscene script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2557
-
validate.is_uioverride(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a ui override script object. If the supplied value is a ui override thentrue
is returned.Parameters:
1
value
value
Returns:
value is a ui override script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2564
-
validate.is_campaignuimanager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign ui manager script object. If the supplied value is a campaign ui manager thentrue
is returned.Parameters:
1
value
value
Returns:
value is a campaign ui manager script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2571
-
validate.is_missionmanager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign mission manager script object. If the supplied value is a campaign mission manager thentrue
is returned.Parameters:
1
value
value
Returns:
value is a campaign mission manager script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2578
-
validate.is_chaptermission(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign chapter mission script object. If the supplied value is a chapter mission thentrue
is returned.Parameters:
1
value
value
Returns:
value is a campaign chapter mission script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2585
-
validate.is_intervention(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign intervention script object. If the supplied value is an intervention thentrue
is returned.Parameters:
1
value
value
Returns:
value is a campaign intervention script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2592
-
validate.is_interventionmanager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign intervention manager script object. If the supplied value is an intervention manager thentrue
is returned.Parameters:
1
value
value
Returns:
value is a campaign intervention manager script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2599
-
validate.is_invasionmanager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign invasion manager script object. If the supplied value is an invasion manager thentrue
is returned.Parameters:
1
value
value
Returns:
value is a campaign intervention manager script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2606
-
validate.is_randomarmy(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign random army manager script object. If the supplied value is a random army manager thentrue
is returned.Parameters:
1
value
value
Returns:
value is a campaign random army manager script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2613
-
validate.is_narrativeevent(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign narrative event script object. If the supplied value is a narrative event thentrue
is returned.Parameters:
1
value
value
Returns:
value is a campaign narrative event script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2620
-
validate.is_narrativequery(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign narrative query script object. If the supplied value is a narrative query thentrue
is returned.Parameters:
1
value
value
Returns:
value is a campaign narrative query script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2627
-
validate.is_narrativetrigger(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a campaign narrative trigger script object. If the supplied value is a narrative trigger thentrue
is returned.Parameters:
1
value
value
Returns:
value is a campaign narrative trigger script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2634
The functions in this section can be used to check whether variables are of a script data type that is provided in battle.
-
validate.is_battlemanager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a battle manager script object. If the supplied value is a battle manager thentrue
is returned.Parameters:
1
value
value
Returns:
value is a battle manager script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2659
-
validate.is_cutscene(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a battle cutscene script object. If the supplied value is a battle cutscene thentrue
is returned.Parameters:
1
value
value
Returns:
value is a battle cutscene script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2666
-
validate.is_convexarea(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a battle convex area script object. If the supplied value is a battle convex area thentrue
is returned.Parameters:
1
value
value
Returns:
value is a battle convex area script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2673
-
validate.is_scriptunit(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a battle scriptunit object. If the supplied value is a scriptunit object thentrue
is returned.Parameters:
1
value
value
Returns:
value is a battle scriptunit objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2680
-
validate.is_scriptunits(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a battle scriptunits collection object. If the supplied value is a scriptunits collection object thentrue
is returned.Parameters:
1
value
value
Returns:
value is a battle scriptunits collection objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2687
-
validate.is_patrolmanager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a battle patrol manager object. If the supplied value is a patrol manager collection object thentrue
is returned.Parameters:
1
value
value
Returns:
value is a battle scriptunits collection objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2694
-
validate.is_waypoint(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a battle waypoint script object. If the supplied value is a waypoint object thentrue
is returned.Parameters:
1
value
value
Returns:
value is a battle scriptunits collection objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2701
-
validate.is_scriptaiplanner(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a battle script ai planner object. If the supplied value is a script ai planner thentrue
is returned.Parameters:
1
value
value
Returns:
value is a battle script ai planner objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2708
-
validate.is_generatedbattle(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a generated battle script object. If the supplied value is a generated battle object thentrue
is returned.Parameters:
1
value
value
Returns:
value is a generated battle objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2715
-
validate.is_generatedarmy(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a generated army script object. If the supplied value is a generated army object thentrue
is returned.Parameters:
1
value
value
Returns:
value is a generated army objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2722
-
validate.is_generatedcutscene(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not a generated cutscene script object. If the supplied value is a generated cutscene object thentrue
is returned.Parameters:
1
value
value
Returns:
value is a generated cutscene objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2729
-
validate.is_advicemanager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not an advice manager script object. If the supplied value is an advice manager object thentrue
is returned.Parameters:
1
value
value
Returns:
value is an advice manager script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2736
-
validate.is_advicemonitor(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not an advice monitor script object. If the supplied value is an advice monitor object thentrue
is returned.Parameters:
1
value
value
Returns:
value is an advice monitor script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2743
-
validate.is_attacklanemanager(value
value)
-
Throws a
script_error
and returnsfalse
if the supplied value is not an attack lane manager script object. If the supplied value is an attack lane manager object thentrue
is returned.Parameters:
1
value
value
Returns:
value is an attack lane manager script objectboolean
defined in ../../Warhammer/working_data/script/_lib/lib_types.lua, line 2750