#1

Is there any way to convert string to bool? Like string to int, string to float and ...
Reply
#2

What do you mean? These things are diffrent, bool can be true or false and strings are holding characters to make readable words.
Reply
#3

I have bool loading with y_ini:

if( ! strcmp( pavadinimas, "Parduodama", true ) ) MasinuDB[ masinosid ][ Parduodama ] = nustatymas;

Ofcourse I get an warning, because nustatymas is string.. And I need to convert it to bool ;S like strval, floatstr
Reply
#4

pawn Код:
#define StringToBool(%1)        (strcmp(%1, "true", true) == 0)
Just one idea, there might be other ways to do it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)