Error Generic Error in Expression: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Some wiki formatting)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Error Generic Error in Expression'''
This error occurs when the type of data an operator is expecting does not match.  
 
This error occurs when they type of data an operator is expecting does not match.  




Line 12: 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