9 December 2016
9 December 2016
string str; ... if(str) // will result in "Cannot convert type 'string' to 'bool'" compilation error (no error would appear in the previous versions) Print("str is true");One should use an explicit condition:
string str; ... //--- check if the string is initialized if(str!=NULL) Print("str is true"); or //--- check if the string value is "true" if(StringCompare(str,"true",false)) Print("str is true"); or //--- check if the string is integer and is not equal to zero if((int)str!=0) Print("str is true");
Fixed errors reported in crash logs.