IO type conversions
Jump to navigation
Jump to search

This article or section needs to be cleaned up to conform to a higher standard of quality.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.
Each output is of certain type and can pass its parameter if the "parameter override" field is left blank. If parameter override is specified it's always of string type.
Possible conversions
- If output and input parameter type match no conversion needed.
- If input takes no parameters we just give it nothing.
- If input takes variant param we just pass it along. (this means that given input will be handling the conversion as it needs)
- If output passes integer, then input can take it if it's float or boolean.
- If output passes float, then input can take it if it's integer or boolean.
- If output passes string (parameter override is also always string so this needs to always work), then input can accept it if it takes integer,float,boolean,vector,color32,ehandle
- If output passes ehandle, then input can take it if it's string in which case it takes the passed ehandle's targetname
Otherwise conversion is invalid and we get the "!! ERROR: bad input/output link:\n!!" error
Example
For example using math_counter and in it defining the following output firing to material_modify_control
OutValue some_material_modify_control SetMaterialVar 123.456
Will work without issues as SetMatrialVar takes string and parameter override is always string. But if we actually tried passing the OutValue's value which is of type float
OutValue some_material_modify_control SetMaterialVar <left blank>
It won't work as conversion from float to string is not defined and we get "!! ERROR: bad input/output link:\n!!"
See also
- material_modify_control - its inputs take string and conversion to string is only possible from string or ehandle
- User Inputs and Outputs - see FireUserX warning
- variant_t::Convert