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(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is notnil. If the supplied value is nil thentrueis returned.Parameters:
1
valuevalue
Returns:
value is nilboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 1916
-
validate.is_number(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not anumber. If the supplied value is a number thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a numberboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 1923
-
validate.is_function(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not afunction. If the supplied value is a function thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a functionboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 1930
-
validate.is_string(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not astring. If the supplied value is a string thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a stringboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 1937
-
validate.is_boolean(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not aboolean. If the supplied value is a boolean thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a booleanboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 1944
-
validate.is_boolean_or_nil(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not abooleanornil. If the supplied value is a boolean or nil thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a booleanboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 1951
-
validate.is_table(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not atable. If the supplied value is a table thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a tableboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 1965
-
validate.is_userdata(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is notuserdata. If the supplied value is userdata thentrueis returned.Parameters:
1
valuevalue
Returns:
value is userdataboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 1972
The functions in this section can be used to check whether variables are specific arrangements of built-in types.
-
validate.is_integer(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not an integer value. If the supplied value is an integer thentrueis returned.Parameters:
1
valuevalue
Returns:
value is an integerboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 1994
-
validate.is_positive_number(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a number greater than zero. If the supplied value is a positive number thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a positive numberboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2001
-
validate.is_non_negative_number(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a number greater than or equal to zero. If the supplied value is a non-negative number thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a non-negative numberboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2008
-
validate.is_non_empty_table(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a non-empty table. If the supplied value is considered to be a non-empty indexed table thentrueis returned. See alsovalidate.is_non_empty_table_indexedwhich should be used for numerically-indexed tables in place of this function.Parameters:
1
valuevalue
Returns:
value is a non-empty tableboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2015
-
validate.is_non_empty_table_indexed(valuevalue) -
Throws a
script_errorand returnsfalseif 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 thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a non-empty indexed tableboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2030
-
validate.is_table_of_strings(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a numerically-indexed table of strings. If the supplied value is a table of strings thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a table of stringsboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2044
-
validate.is_string_or_table_of_strings(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a string, or a numerically-indexed table of strings. If the supplied value is either of these value types thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a string/table of stringsboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2058
-
validate.is_table_of_strings_allow_empty(valuevalue) -
Throws a
script_errorand returnsfalseif 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 thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a string/table of stringsboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2072
-
validate.is_condition(valuevalue) -
Throws a
script_errorand returnsfalseif 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 thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a function or trueboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2086
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(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not an event context. If the supplied value is an event context thentrueis returned.Parameters:
1
valuevalue
Returns:
value is an event contextboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2103
-
validate.is_uicomponent(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a uicomponent. If the supplied value is a uicomponent thentrueis returned.Parameters:
1
valuevalue
Returns:
value is an event contextboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2110
-
validate.is_component(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a component memory address. If the supplied value is a component memory address thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a component memory addressboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2117
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(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign null script interface. If the supplied value is a null script interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a null script interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2139
-
validate.is_model(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign model interface. If the supplied value is a model interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a model interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2146
-
validate.is_world(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign world interface. If the supplied value is a world interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a world interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2153
-
validate.is_faction(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign faction interface. If the supplied value is a faction interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a faction interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2160
-
validate.is_factionlist(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign faction list interface. If the supplied value is a faction list interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a faction list interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2167
-
validate.is_character(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign character interface. If the supplied value is a character interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a character interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2174
-
validate.is_familymember(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign family member interface. If the supplied value is a family member interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a family member interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2181
-
validate.is_characterlist(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign character list interface. If the supplied value is a character list interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a character list interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2188
-
validate.is_regionmanager(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign region manager interface. If the supplied value is a region manager interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a region manager interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2195
-
validate.is_region(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign region interface. If the supplied value is a region interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a region interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2202
-
validate.is_regiondata(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign region data interface. If the supplied value is a region data interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a region data interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2209
-
validate.is_province(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign province interface. If the supplied value is a province interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a province interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2216
-
validate.is_factionprovince(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign faction province interface. If the supplied value is a faction province interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a faction province interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2223
-
validate.is_regionlist(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign region list interface. If the supplied value is a region list interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a region list interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2230
-
validate.is_garrisonresidence(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign garrison residence interface. If the supplied value is a garrison residence interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a garrison residence interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2237
-
validate.is_settlement(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign settlement interface. If the supplied value is a settlement interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a settlement interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2244
-
validate.is_slot(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign slot interface. If the supplied value is a slot interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a slot interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2251
-
validate.is_slotlist(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign slot list interface. If the supplied value is a slot list interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a slot list interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2258
-
validate.is_militaryforce(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign military force interface. If the supplied value is a military force interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a military force interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2265
-
validate.is_militaryforcelist(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign military force list interface. If the supplied value is a military force list interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a military force list interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2272
-
validate.is_unit(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a unit interface. If the supplied value is a unit interface thentrueis returned. This works in both campaign and battle on their respective unit object types.Parameters:
1
valuevalue
Returns:
value is a unit interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2279
-
validate.is_unitlist(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign unit list interface. If the supplied value is a unit list interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a unit list interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2286
-
validate.is_pendingbattle(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign pending battle interface. If the supplied value is a pending battle interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a pending battle interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2293
-
validate.is_campaignmission(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign mission interface. If the supplied value is a mission interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a mission interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2300
-
validate.is_campaignai(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign ai interface. If the supplied value is a campaign ai interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a campaign ai interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2307
-
validate.is_buildinglist(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign building list interface. If the supplied value is a building list interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a building list interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2314
-
validate.is_building(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a building interface. If the supplied value is a building interface thentrueis returned. This works in both campaign and battle on their respective object types.Parameters:
1
valuevalue
Returns:
value is a building interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2321
-
validate.is_foreignslotmanager(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a foreign slot manager interface. If the supplied value is a foreign slot manager interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a foreign slot manager interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2328
-
validate.is_foreignslot(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a foreign slot interface. If the supplied value is a foreign slot interface thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a foreign slot interfaceboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2335
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(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a battle sound effect. If the supplied value is a battle sound effect thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a battle sound effectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2356
-
validate.is_battle(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a battle object. If the supplied value is a battle object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a battle objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2363
-
validate.is_alliances(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not an alliances collection object. If the supplied value is an alliances object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is an alliances objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2370
-
validate.is_alliance(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not an alliance object. If the supplied value is an alliance object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is an alliance objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2377
-
validate.is_armies(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not an armies collection object. If the supplied value is an armies object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is an armies objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2384
-
validate.is_army(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not an army object. If the supplied value is an army object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is an army objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2391
-
validate.is_units(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a units collection object. If the supplied value is a units object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a units objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2398
-
validate.is_unitcontroller(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a unitcontroller object. If the supplied value is a unitcontroller object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a unitcontroller objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2405
-
validate.is_vector(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a battle vector object. If the supplied value is a vector object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a battle vector objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2412
-
validate.is_buildings(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a buildings collection object. If the supplied value is a buildings collection object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a buildings collection objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2419
-
validate.is_subtitles(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a subtitles object. If the supplied value is a subtitles object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a subtitles objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2426
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(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a core script object. If the supplied value is a core object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a core objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2450
-
validate.is_timermanager(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a timer manager script object. If the supplied value is a timer manager thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a timer manager objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2457
-
validate.is_scriptmessager(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a script messager object. If the supplied value is a script messager thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a script messager objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2464
-
validate.is_customcontext(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a custom event context object. If the supplied value is a custom context thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a script messager objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2471
-
validate.is_objectivesmanager(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not an objectives manager script object. If the supplied value is an objectives manager thentrueis returned.Parameters:
1
valuevalue
Returns:
value is an objectives manager objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2478
-
validate.is_infotextmanager(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not an infotext manager script object. If the supplied value is an infotext manager thentrueis returned.Parameters:
1
valuevalue
Returns:
value is an infotext manager objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2485
-
validate.is_linkparser(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a link parser script object. If the supplied value is a link parser thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a link parser objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2492
-
validate.is_tooltiplistener(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a tooltip listener script object. If the supplied value is a tooltip listener thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a tooltip listener objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2499
-
validate.is_tooltippatcher(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a tooltip patcher script object. If the supplied value is a tooltip patcher thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a tooltip patcher objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2506
-
validate.is_helppagemanager(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a help page manager script object. If the supplied value is a help page manager thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a help page manager objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2513
-
validate.is_helppage(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a help page script object. If the supplied value is a help page thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a help page objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2520
-
validate.is_textpointer(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a text pointer script object. If the supplied value is a text pointer thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a help page objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2527
-
validate.is_activepointer(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not an active pointer script object. If the supplied value is an active pointer thentrueis returned.Parameters:
1
valuevalue
Returns:
value is an active pointer objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2534
-
validate.is_scriptedtour(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a scripted tour object. If the supplied value is a scripted tour thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a scripted tour objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2541
-
validate.is_navigabletour(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a navigable tour object. If the supplied value is a navigable tour thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a navigable tour objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2548
-
validate.is_navigabletoursection(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a navigable tour section object. If the supplied value is a navigable tour section thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a navigable tour section objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2555
-
validate.is_movieoverlay(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a movie overlay script object. If the supplied value is a movie overlay thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a movie overlay objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2562
-
validate.is_windowedmovieplayer(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a windowed movie player script object. If the supplied value is a windowed movie player thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a windowed movie player objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2569
-
validate.is_topicleader(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a topic leader script object. If the supplied value is a topic leader thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a topic leader objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2576
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(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign manager script object. If the supplied value is a campaign manager thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a campaign manager script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2600
-
validate.is_campaigncutscene(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign cutscene script object. If the supplied value is a campaign cutscene thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a campaign cutscene script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2607
-
validate.is_uioverride(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a ui override script object. If the supplied value is a ui override thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a ui override script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2614
-
validate.is_campaignuimanager(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign ui manager script object. If the supplied value is a campaign ui manager thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a campaign ui manager script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2621
-
validate.is_missionmanager(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign mission manager script object. If the supplied value is a campaign mission manager thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a campaign mission manager script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2628
-
validate.is_chaptermission(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign chapter mission script object. If the supplied value is a chapter mission thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a campaign chapter mission script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2635
-
validate.is_intervention(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign intervention script object. If the supplied value is an intervention thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a campaign intervention script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2642
-
validate.is_interventionmanager(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign intervention manager script object. If the supplied value is an intervention manager thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a campaign intervention manager script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2649
-
validate.is_invasionmanager(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign invasion manager script object. If the supplied value is an invasion manager thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a campaign intervention manager script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2656
-
validate.is_randomarmy(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign random army manager script object. If the supplied value is a random army manager thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a campaign random army manager script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2663
-
validate.is_narrativeevent(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign narrative event script object. If the supplied value is a narrative event thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a campaign narrative event script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2670
-
validate.is_narrativequery(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign narrative query script object. If the supplied value is a narrative query thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a campaign narrative query script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2677
-
validate.is_narrativetrigger(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a campaign narrative trigger script object. If the supplied value is a narrative trigger thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a campaign narrative trigger script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2684
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(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a battle manager script object. If the supplied value is a battle manager thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a battle manager script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2709
-
validate.is_cutscene(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a battle cutscene script object. If the supplied value is a battle cutscene thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a battle cutscene script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2716
-
validate.is_convexarea(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a battle convex area script object. If the supplied value is a battle convex area thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a battle convex area script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2723
-
validate.is_scriptunit(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a battle scriptunit object. If the supplied value is a scriptunit object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a battle scriptunit objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2730
-
validate.is_scriptunits(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a battle scriptunits collection object. If the supplied value is a scriptunits collection object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a battle scriptunits collection objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2737
-
validate.is_patrolmanager(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a battle patrol manager object. If the supplied value is a patrol manager collection object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a battle scriptunits collection objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2744
-
validate.is_waypoint(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a battle waypoint script object. If the supplied value is a waypoint object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a battle scriptunits collection objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2751
-
validate.is_scriptaiplanner(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a battle script ai planner object. If the supplied value is a script ai planner thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a battle script ai planner objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2758
-
validate.is_generatedbattle(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a generated battle script object. If the supplied value is a generated battle object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a generated battle objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2765
-
validate.is_generatedarmy(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a generated army script object. If the supplied value is a generated army object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a generated army objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2772
-
validate.is_generatedcutscene(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not a generated cutscene script object. If the supplied value is a generated cutscene object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is a generated cutscene objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2779
-
validate.is_advicemanager(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not an advice manager script object. If the supplied value is an advice manager object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is an advice manager script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2786
-
validate.is_advicemonitor(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not an advice monitor script object. If the supplied value is an advice monitor object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is an advice monitor script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2793
-
validate.is_attacklanemanager(valuevalue) -
Throws a
script_errorand returnsfalseif the supplied value is not an attack lane manager script object. If the supplied value is an attack lane manager object thentrueis returned.Parameters:
1
valuevalue
Returns:
value is an attack lane manager script objectboolean
defined in ../../../warhammer/working_data/script/_lib/lib_types.lua, line 2800