Raised This Month: $ Target: $400
 0% 

Help with this area in my plugin, arrays to filter out blues!


Post New Thread Reply   
 
Thread Tools Display Modes
SNCurti
Member
Join Date: Feb 2016
Old 04-10-2016 , 23:00   Re: Help with this area in my plugin, arrays to filter out blues!
Reply With Quote #11

Well it still persists after some trying to rework it.
I really need a fix from someone, I tried a lot of solutions on my own and this is my final attempt at figuring out why it's stopping at that point, and why the plugin isn't working (the point it stops at is at the loop to check the bomber's team and see if he's red and pass it on to the array).

I need a solution, thank you 8guawong for helping me identify where the problem lies, now, I've tried to fix that problem extensively but I cannot figure it out. Please, can someone find the solution or the problem?
SNCurti is offline
klashfire
Member
Join Date: May 2014
Location: NY, USA
Old 04-11-2016 , 18:49   Re: Help with this area in my plugin, arrays to filter out blues!
Reply With Quote #12

Quote:
Originally Posted by 8guawong View Post
well there you go now you know where the problem is!
now just figure out why it's not going past that part of the code

hint: https://forums.alliedmods.net/showpo...31&postcount=3
I know this doesn't really pertain to the problem at hand, but wouldn't
PHP Code:
for (int i 1<= GetClientCount(true); i++)
{
    
PlayersInRaffle[player] = i;
    
player++;

work as a shorthand, just as well? GetClientCount(true) already checks if a client is in game.
Not much need for an extra if statement.
__________________


Last edited by klashfire; 04-11-2016 at 18:50.
klashfire is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 04-11-2016 , 19:14   Re: Help with this area in my plugin, arrays to filter out blues!
Reply With Quote #13

Quote:
Originally Posted by klashfire View Post
I know this doesn't really pertain to the problem at hand, but wouldn't
PHP Code:
for (int i 1<= GetClientCount(true); i++)
{
    
PlayersInRaffle[player] = i;
    
player++;

work as a shorthand, just as well? GetClientCount(true) already checks if a client is in game.
Not much need for an extra if statement.
this will not work
i'm assuming you want to get a list of player index that will be in the raffle
getclientcount returns a number i think (didn't look it up)
so you are looping thourgh 1 - number of clients in game right now (lets say 17)
so 1 through 17 you'll face the same problem with one of those number not in game
__________________

Last edited by 8guawong; 04-11-2016 at 19:18.
8guawong is offline
SNCurti
Member
Join Date: Feb 2016
Old 04-13-2016 , 07:16   Re: Help with this area in my plugin, arrays to filter out blues!
Reply With Quote #14

Quote:
Originally Posted by 8guawong View Post
this will not work
i'm assuming you want to get a list of player index that will be in the raffle
getclientcount returns a number i think (didn't look it up)
so you are looping thourgh 1 - number of clients in game right now (lets say 17)
so 1 through 17 you'll face the same problem with one of those number not in game
I figured it out, was a problem with nothe checking if client was in game which broke the code.
SNCurti is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 04-13-2016 , 09:13   Re: Help with this area in my plugin, arrays to filter out blues!
Reply With Quote #15

Quote:
Originally Posted by SNCurti View Post
I figured it out, was a problem with nothe checking if client was in game which broke the code.
did you even read my post?

https://forums.alliedmods.net/showpo...7&postcount=10

LOL

well anyway congratulation
__________________
8guawong 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 21:00.


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