Fixed passing bool to message()
parent
b5e27c9f19
commit
3c98af04b5
|
@ -70,7 +70,7 @@ public:
|
||||||
return LoadString(TX_NAN);
|
return LoadString(TX_NAN);
|
||||||
|
|
||||||
std::ostringstream s;
|
std::ostringstream s;
|
||||||
s << m_val;
|
s << std::boolalpha << m_val;
|
||||||
return s.str();
|
return s.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2859,6 +2859,7 @@ CBotTypResult CScriptFunctions::cMessage(CBotVar* &var, void* user)
|
||||||
{
|
{
|
||||||
if ( var == nullptr ) return CBotTypResult(CBotErrLowParam);
|
if ( var == nullptr ) return CBotTypResult(CBotErrLowParam);
|
||||||
if ( var->GetType() != CBotTypString &&
|
if ( var->GetType() != CBotTypString &&
|
||||||
|
var->GetType() != CBotTypBoolean &&
|
||||||
var->GetType() > CBotTypDouble ) return CBotTypResult(CBotErrBadNum);
|
var->GetType() > CBotTypDouble ) return CBotTypResult(CBotErrBadNum);
|
||||||
var = var->GetNext();
|
var = var->GetNext();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue