Raised This Month: $51 Target: $400
 12% 

bool [MAXPLAYERS + 1]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 04-15-2018 , 06:44   bool [MAXPLAYERS + 1]
Reply With Quote #1

bool MAX_PLAYERS[MAXPLAYERS + 1];

Hi all, how to make that the place 66 was for example 4.
Alexmy is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 04-15-2018 , 08:19   Re: bool [MAXPLAYERS + 1]
Reply With Quote #2

I don't really know what you're asking besides "how do I make an array of 4 booleans." If that's what you're asking, bool myArray[4];.
Fyren is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 04-15-2018 , 14:50   Re: bool [MAXPLAYERS + 1]
Reply With Quote #3

Quote:
Code:
bool MAX_PLAYERS[MAXPLAYERS + 1];
It has no sense. MAX_PLAYERS is reserved name of const.
UPD. I didn't notice that MAX_PLAYERS and MAXPLAYERS is different. Not a good idea to give such alike names.

Quote:
Hi all, how to make that the place 66 was for example 4.
Also, no sense.

bool can be true or false, not 4. If you don't plan to cast of course. In such case:
Code:
bool arr[MAXPLAYERS + 1];
arr[65] = view_as<bool>(4);
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 04-15-2018 at 14:51.
Dragokas is offline
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 04-19-2018 , 06:05   Re: bool [MAXPLAYERS + 1]
Reply With Quote #4

I resolved the issue.
Alexmy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:50.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode