Error Generic Error in Expression: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Some wiki formatting)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
This error occurs when they type of data an operator is expecting does not match.  
This error occurs when the type of data an operator is expecting does not match.  




Line 10: Line 10:


'''Example:'''
'''Example:'''
<sqf>
_myString = "The meaning of life is " + 42; // error
_myString = "The meaning of life is " + str 42; // OK
_myString = "The meaning of life is " + format ["%1", 42]; // OK - {{Name|ofp|short}}
</sqf>


_myString = "The meaning of life is " + 42


[[Category:Common Scripting Errors]]
[[Category:Common Scripting Errors]]

Latest revision as of 14:35, 27 March 2024

This error occurs when the type of data an operator is expecting does not match.


Compatibility:

Version 1.96


Example:

_myString = "The meaning of life is " + 42; // error _myString = "The meaning of life is " + str 42; // OK _myString = "The meaning of life is " + format ["%1", 42]; // OK - OFP