View Single Post
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-09-2018 , 03:44   Re: Booleans outputs integers?
Reply With Quote #7

Quote:
Originally Posted by ddhoward View Post
Does !! not work in AMX Mod X? Also, why are you tagging as bool something that is already bool? If your ternary operator is already returning true or false... the tag isn't necessary?

PHP Code:
g_bAdmin[id] = !!(get_user_flags(id) & ADMIN_LEVEL_G); 
Is this not valid in Amx?
It works.

Quote:
Originally Posted by fatal_nl View Post
PHP Code:
// ... 
This wil give 262144 in chat. I thought booleans are supposed to give either true (1) or false (0).

EVERYTHING in this language is a 32-bit cell or an array of it. Integers, booleans, floats, strings and pointers, it's just all the same. Tags are there so the compiler can point out possible mistakes.
__________________

Last edited by Black Rose; 08-09-2018 at 03:57.
Black Rose is offline