Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rankings Issues #154

Closed
Technoblazed opened this issue Aug 8, 2016 · 12 comments
Closed

Rankings Issues #154

Technoblazed opened this issue Aug 8, 2016 · 12 comments
Assignees

Comments

@Technoblazed
Copy link
Contributor

Technoblazed commented Aug 8, 2016

  • After getting a WR and doing !rank, the client remains unranked.
  • First record set on a map is receiving 49.99 points.
  • 49.993 + 24.491 = 73.26? Nope D: Actually is 74.484, I know it's only 1, but would annoy someone else.
@shavitush shavitush added the bug label Aug 8, 2016
@shavitush shavitush added this to the 1.5b milestone Aug 8, 2016
@shavitush shavitush self-assigned this Aug 8, 2016
@shavitush
Copy link
Owner

After getting a WR and doing !rank, the client remains unranked.

weird, i'll take a look

First record set on a map is receiving 49.99 points.

sourcemod's rounding ughhh, i'll fix it though

49.993 + 24.491 = 73.26? Nope D: Actually is 74.484, I know it's only 1, but would annoy someone else.

49.993 = 100% = 49.993
24.491 = 97% (dropped by 3% in weighting) = 23.75627

I thought you knew we use a weighting system :/

@shavitush
Copy link
Owner

shavitush commented Aug 8, 2016

anyways ok this new ranking method is a really big mess, i'll rewrite it all this weeksoon and try to make it actually make sense

@Technoblazed
Copy link
Contributor Author

Technoblazed commented Oct 26, 2016

Is anybody currently using the ranking system, if so, what are the outlying issues with itself and chat? Like, will it sort of work?

@shavitush
Copy link
Owner

shavitush commented Oct 26, 2016

i think you won't gain points and rank calculation will be broken. chat itself is fine afaik

@Technoblazed
Copy link
Contributor Author

But the link between shavit-chat <-> shavit-ranking is that they both rely on each other correct?

@shavitush
Copy link
Owner

shavit-chat relies on shavit-rankings, but not vice versa

@Nickelony
Copy link
Collaborator

Here's a working version of shavit-rankings made by zipcore: https://pastebin.com/raw/iuz6bgky

He tried to fix the plugin just so it works, but the rankings are killing the mysql database so it's unusable, but maybe this can help you in the future.

@shavitush
Copy link
Owner

I'll look into it soon and try optimizing the plugin, thanks.

@Nickelony
Copy link
Collaborator

Nickelony commented Jun 3, 2017

oh and this in shavit-core:

char[] sQuery = new char[512];
	FormatEx(sQuery, 512, "REPLACE INTO %susers (auth, name, country, ip, lastlogin) VALUES ('%s', '%s', '%s', '%s', %d);", gS_MySQLPrefix, sAuthID3, sEscapedName, sCountry, sIP, GetTime());

replace with:

char[] sQuery = new char[2048];
	
	if (gB_MySQL)
		FormatEx(sQuery, 2048, "INSERT INTO %susers (auth, name, country, ip, lastlogin) VALUES ('%s', '%s', '%s', '%s', %d) ON DUPLICATE KEY UPDATE name = '%s' , country = '%s', ip = '%s', lastlogin = %d;", gS_MySQLPrefix, sAuthID3, sEscapedName, sCountry, sIP, GetTime(), sEscapedName, sCountry, sIP, GetTime());
	else FormatEx(sQuery, 2048, "REPLACE INTO %susers (auth, name, country, ip, lastlogin) VALUES ('%s', '%s', '%s', '%s', %d);", gS_MySQLPrefix, sAuthID3, sEscapedName, sCountry, sIP, GetTime());

and this

FormatEx(sQuery, 512, "CREATE TABLE IF NOT EXISTS `%susers` (`auth` VARCHAR(32) NOT NULL, `name` VARCHAR(32), `country` VARCHAR(128), `ip` VARCHAR(64), `lastlogin` %s NOT NULL DEFAULT -1, `points` FLOAT NOT NULL DEFAULT 0, PRIMARY KEY (`auth`));", gS_MySQLPrefix, gB_MySQL? "INT":"INTEGER");

with this:

FormatEx(sQuery, 512, "CREATE TABLE IF NOT EXISTS `%susers` (`auth` VARCHAR(32) NOT NULL, `name` VARCHAR(32), `country` VARCHAR(128), `ip` VARCHAR(64), `lastlogin` %s NOT NULL DEFAULT -1, `points` FLOAT NOT NULL DEFAULT 0, PRIMARY KEY (`auth`)%s);", gS_MySQLPrefix, gB_MySQL? "INT":"INTEGER", gB_MySQL ? ", UNIQUE KEY `auth` (`auth`)" : "");

It's because the points are reseting on join and mapchange.

@shavitush shavitush removed this from the 1.5b milestone Jul 12, 2017
@shavitush shavitush added this to the Release milestone Aug 1, 2017
@Nickelony
Copy link
Collaborator

Nickelony commented Aug 2, 2017

I think this is the next big think you should start working on because everyone is waiting for a fully functional rankings plugin that delivers all the necessary features (and doesn't suck).

I don't think you have to rewrite your plugin since it's very good and I gave you a (almost) fully working version of it (credit to Zipcore). The only think you have to do is to optimise it, because for some reason it's killing the database within 10 seconds. xD

@shavitush
Copy link
Owner

I'll rewrite it because I don't like the way I did things before, no worries! Rankings are basically the last thing I need to do before the timer is out of beta :).

@shavitush
Copy link
Owner

Closing as I made my own issue with a new design: #465

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants