Raised This Month: $ Target: $400
 0% 

[TF2] gScramble Team Balancer/Scrambler -- 3.0.33 4/14/2015


Post New Thread Reply   
 
Thread Tools Display Modes
Mister_Magotchi
SourceMod Donor
Join Date: Dec 2006
Location: Nampa, Idaho
Old 12-09-2010 , 02:52   Re: gscramble -- Beta 3.0.08 12/7/10 - re-appove please?
Reply With Quote #961

Hi again. I've been doing some more testing, and I came up with this:

My gs_sort_mode is 12.
I'm using the latest version of your plugin.
I have the HLstatsX:CE API compiled from the source here.
When I load gscramble, it isn't warning me that the HLstatsX API isn't available (only that the gameME one isn't).

I don't believe your plugin is actually grabbing any HLstatsX data from the API, at least on my server. Here's why:

I added some lines to log things in your code for testing (look for 3 lines that say "TEST" in them):
Code:
public OnClientPostAdminCheck(client)
{
	if(IsFakeClient(client))
		return;
		
	if (GetConVarBool(cvar_Preference) && g_bAutoBalance && g_bHooked)
		CreateTimer(25.0, Timer_PrefAnnounce, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE);
	g_aPlayers[client][iBlockTime] = 0;
	g_aPlayers[client][iBalanceTime] = 0;
	g_aPlayers[client][iTeamworkTime] = 0;
	g_aPlayers[client][iFrags] = 0;
	g_aPlayers[client][iDeaths] = 0;
	g_aPlayers[client][bHasFlag] = false;
	if (GetConVarBool(cvar_AdminBlockVote) && CheckCommandAccess(client, "sm_scramblevote", ADMFLAG_BAN))
	{
		g_aPlayers[client][bIsVoteAdmin] = true;
		g_iNumAdmins++;
	}
	else 
		g_aPlayers[client][bIsVoteAdmin] = false;
	
	g_aPlayers[client][bHasVoted] = false;
	g_iVoters++;
	g_iVotesNeeded = RoundToFloor(float(g_iVoters) * GetConVarFloat(cvar_PublicNeeded)) + 1;

	LogToGame("TEST: Deciding to get player data or not.");
	if (g_bUseHlxCe && GetFeatureStatus(FeatureType_Native, "HLXCE_GetPlayerData") == FeatureStatus_Available)
	{
		LogToGame("TEST: Getting player data.");
		HLXCE_GetPlayerData(client);
	}
}

public HLXCE_OnGotPlayerData(client, const HLXCE_PlayerData:PData[])
{
	g_aPlayers[client][iHlxCe_Rank] = PData[PData_Rank];
	LogToGame("TEST: %N rank is %d", client, PData[PData_Rank]);
	g_aPlayers[client][iHlxCe_Skill] = PData[PData_Skill];
}
I recompiled the plugin with those changes and reloaded it on my server. I changed the map. I joined the server. I then quit and checked the logs.

The logs only showed "TEST: Deciding to get player data or not.", but not the other two test lines. It never even passed the if condition to run HLXCE_GetPlayerData.

I imagine the plugin must be reverting back to some other sort method, and when I said it was working previously, it must have just been using another method.

Do you think it's the plugin, or do you think I'm doing something wrong on my end?

EDIT:
Also:
Quote:
- changed vote triggers to use commands, and not saychat
I used to have all my players know to type "scramble". Now that you made them into commands, I can't use "!scramble", as that interferes with sm_scramble. Now I have to get everyone taught to use "!votescramble". Although I understand if you keep it this way, it would be nice to at least change "sm_scramble" to something different. Admins are easier to train than players. In my case, I'll just do it myself, actually, but I imagine there may be others with a similar situation.

Last edited by Mister_Magotchi; 12-09-2010 at 04:54.
Mister_Magotchi is offline
BrutalGoerge
AlliedModders Donor
Join Date: Jul 2007
Old 12-09-2010 , 03:10   Re: gscramble -- Beta 3.0.08 12/7/10 - re-appove please?
Reply With Quote #962

noep, i fucked it up

lulz

on ALLPLUGINSLOADED, i forgot to add the couple lines to look for the hlxce library

confusing since i do it differntly for gameME, but gameMe's current release doesnt register its plugin library
__________________
My Pluggies If you like, consider to me.
BrutalGoerge is offline
Mister_Magotchi
SourceMod Donor
Join Date: Dec 2006
Location: Nampa, Idaho
Old 12-09-2010 , 04:52   Re: gscramble -- Beta 3.0.09 12/7/10 - re-appove please?
Reply With Quote #963

You're so damn quick.

I haven't tested this newest one yet, but FYI:

I've been working with developing something using the HLstatsX: CE API myself over on my CS:S server, and I was having extreme difficulty getting the "rank" value (though points, kills, deaths, etc. were working fine) from it. Even just compiling the sample plugin they provide and running it doesn't log the correct ranks as it's supposed to, and it can sometimes crash the server.

I only discovered the problem with yours because I was trying to see how/if you figured out a way around the problem

Anyway, thanks for all the time you spend on this project.
Mister_Magotchi is offline
psychonic

BAFFLED
Join Date: May 2008
Old 12-09-2010 , 06:51   Re: gscramble -- Beta 3.0.09 12/7/10 - re-appove please?
Reply With Quote #964

Quote:
Originally Posted by Mister_Magotchi View Post
You're so damn quick.

I haven't tested this newest one yet, but FYI:

I've been working with developing something using the HLstatsX: CE API myself over on my CS:S server, and I was having extreme difficulty getting the "rank" value (though points, kills, deaths, etc. were working fine) from it. Even just compiling the sample plugin they provide and running it doesn't log the correct ranks as it's supposed to, and it can sometimes crash the server.

I only discovered the problem with yours because I was trying to see how/if you figured out a way around the problem

Anyway, thanks for all the time you spend on this project.
The HLX:CE Api was never finished as I mentioned to Goerge in another thread. Now that it has plans to be used, I'll look at it today to clean it up and see if there is indeed a bug with rank and fix if necessary.
psychonic is offline
BrutalGoerge
AlliedModders Donor
Join Date: Jul 2007
Old 12-09-2010 , 07:56   Re: gscramble -- Beta 3.0.09 12/7/10 - re-appove please?
Reply With Quote #965

wasn't sure if you meant it was working or not.
was just guna let others see if it was working or not, i just made sure it loaded

now that I have a hlxce test db and the api pl ugin running im getting 'invalid memory access' error on the forward HLXCE_OnGotPlayerData()

Code:
// this is correct usage? 
public HLXCE_OnClientReady(client)
{
	HLXCE_GetPlayerData(client);
}

public HLXCE_OnGotPlayerData(client, const HLXCE_PlayerData:PData[])
{
	g_aPlayers[client][iHlxCe_Rank] = PData[PData_Rank];
	g_aPlayers[client][iHlxCe_Skill] = PData[PData_Skill];
}
my sleeping habits are just piss awful lately. ill take a nap and take a quick look again. doesn't hurt to have 2 sets of eyes going over it
__________________
My Pluggies If you like, consider to me.

Last edited by BrutalGoerge; 12-09-2010 at 08:02.
BrutalGoerge is offline
Mister_Magotchi
SourceMod Donor
Join Date: Dec 2006
Location: Nampa, Idaho
Old 12-09-2010 , 13:53   Re: gscramble -- Beta 3.0.09 12/7/10 - re-appove please?
Reply With Quote #966

"Invalid access to memory" was exactly what I was getting when I tried to assign the value of PData[PData_Rank] to a cell in an array.

psychonic: thanks for watching this thread. It's hard to find official documentation on the API. Googling about it finds so little. I just assumed that since it existed in the repository that it must work.
Mister_Magotchi is offline
psychonic

BAFFLED
Join Date: May 2008
Old 12-09-2010 , 14:17   Re: gscramble -- Beta 3.0.09 12/7/10 - re-appove please?
Reply With Quote #967

Quote:
Originally Posted by Mister_Magotchi View Post
"Invalid access to memory" was exactly what I was getting when I tried to assign the value of PData[PData_Rank] to a cell in an array.

psychonic: thanks for watching this thread. It's hard to find official documentation on the API. Googling about it finds so little. I just assumed that since it existed in the repository that it must work.
There's no official documentation because it was never released. It was created over a year ago, partially as an experiment. It was my first time using each of enum arrays, natives, and forwards.
psychonic is offline
BrutalGoerge
AlliedModders Donor
Join Date: Jul 2007
Old 12-09-2010 , 16:14   Re: gscramble -- Beta 3.0.09 12/7/10 - re-appove please?
Reply With Quote #968

Hey i got it to retrieve data w.o any errors.
Only a couple little fixes were needed.
new g_iPlayerCounts[MAXPLAYERS+1][HLXCE_PlayerData];
Call_PushArray(g_iPlayerCounts[client][0], 5); <-- duno why you have the size as 5 when there are 8 enum values, but i left that alone.


Code:
L 12/09/2010 - 16:07:33: [gscramble.smx] rank 2  skill 15396
it read the skill correctly, tho it read my rank as #2, but the web page shows it as #1
tho its just a test DB from my server a year ago, old version of hlxCE
http://gameserver.fpsbanana.com/stats

I have attached the updated api sp

I was considering PM'ing you Psychonic, but I didnt feel like being ended today ^_^
__________________
My Pluggies If you like, consider to me.

Last edited by BrutalGoerge; 12-10-2010 at 01:15.
BrutalGoerge is offline
Mister_Magotchi
SourceMod Donor
Join Date: Dec 2006
Location: Nampa, Idaho
Old 12-10-2010 , 01:10   Re: gscramble -- Beta 3.0.09 12/7/10 - re-appove please?
Reply With Quote #969

Nice.
Mister_Magotchi is offline
BrutalGoerge
AlliedModders Donor
Join Date: Jul 2007
Old 12-10-2010 , 01:16   Re: gscramble -- Beta 3.0.09 12/7/10 - re-appove please?
Reply With Quote #970

psychonic fixed it along with the include file and an issue with the sql query.
its on the repo
__________________
My Pluggies If you like, consider to me.
BrutalGoerge 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:30.


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