vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   ibProArcade Archive (https://vborg.vbsupport.ru/forumdisplay.php?f=174)
-   -   [BUG] Tournament ladder (https://vborg.vbsupport.ru/showthread.php?t=105969)

cyberhypnotic 01-22-2006 04:46 AM

[BUG] Tournament ladder
 
Seems as though my members are not moving up to the next round sometimes.

Before I had players not moving from 1st round up to 2nd round. Now They seem to be not moving from 2nd round to 3rd round (finals).

Aslo, if member1 beats member2, member1 goes above member3 and member4 in the next round.

Here's what it looks like (click to enlarge, of course):
https://vborg.vbsupport.ru/external/2006/01/5.jpg

As you can see in the 1st round, jessicajoanne moved above cyberhypnotic's 1st match when she won and I moved above hers when I won. Then moxdevil won the 2nd round and moved above jessicajoanne and cyberhypnotic's 2nd match.

Also, jessicajoanne won the 2nd round, but it won't move her up.

Any suggestions?

One last thing, is the tournament fixed to be playable on IE?

MrZeropage 01-22-2006 06:26 AM

Tournaments are playable in IE, yes :)


The sorting in each line depends on the UserID, this means your 2nd round with 4 players left is sorted by UserID from left to right. That's why "jessicajoanne" moved leftmost, seems this user has the lowest UserID.
This User also should move up to the Final, that's right... Hmmmm, I will check this again.

Please test 2- and 4-player-Tournaments, they should work well ?

cyberhypnotic 01-22-2006 06:32 AM

2 Player tournament worked fine. I'll check on the 4 Player tourney.

Here's the thing. You said the users are moved according to UserID?

Well, by UserID, they are lined up jessicajoanne (11), cyberhypnotic (1), moxdevil (13), and nsewerin (14).

Same with the 1st round. As you can see, moxdevil is 13 and nsewerin is 14, but 69Charger is 50 and between them. :ermm:

This is just a guess, but this is my thoughts on it:

What if - moxdevil(13) moves up before jessicajoanne(11), therefore being organized according to UserID before jessicajoanne(11) is able to move up. Know what I mean? (13) took the place of (11), therefore leaving nowhere for (11) to go, so (11) sits in 2nd round waiting.

Another thing. Nothing big and major, just a typo. Some people might want to know how to fix it later on though:

In arcade.php (root folder), if you look for one time:
Code:

{$playerinfo[3]['timesplayed']}{$ibforums->lang['tourneytxt1']}
and replace with:
Code:

{$playerinfo[3]['timesplayed']}{$ibforums->lang['tourneytxt2']}
The difference is the number in tourneytxt. It makes the one tournament cell "studder" by repeating the text for line one over. (has playedhas played)

MrZeropage 01-22-2006 08:01 AM

Hmmm, did you upgrade to v2.5.4+ and have the actual arcade.php ?

cyberhypnotic 01-22-2006 05:40 PM

Yes, I had version 2.5.3 installed from a fresh install originally. Then when you released 2.5.4, I followed instructions exactly as given.

I've had this problem, even in version 2.5.3. I'm actually surprised nobody else complained about it, which kinda makes me think it's something with my copy only.

Do you suggest an uninstall and then a fresh install? Should I delete everything from my server, including games? Making it like it never existed? Then do a brand new fresh install?

Or are you still looking into the code? Is there any possible way to stop the code from ordering by member ID? That way, the winner of each round just moves up to their respective next round in the ladder?

Reece^B 01-22-2006 06:19 PM

MR.Zeropage

Im getting this error:
Code:

There is a SQL error.
You can contact the board administrator by clicking here

Error Returned
mySQL query error: SELECT userid, username FROM user WHERE userid IN() ORDER BY userid mySQL error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY userid' at line 1 mySQL error code: Date: Sunday 22nd of January 2006 03:11:51 PM

We apologise for any inconvenience

This happens when I created a two player T and when it redirects me.

MrZeropage 01-22-2006 07:56 PM

@cyberhypnotic:
I can confirm that there sometimes is a problem with 8-player-tournaments, but I am not sure how to reproduce it. This now is on the "Bug-List" and I will look for a fix.
The sorting is another thing I'd like to change, and as there are many planned improvements for the Tournament-System I guess this will come along with that.


@Reece B:
Create the Tournament in AdminCP instead of ModCP and the Error won't show up ;)
Will fix the ModCP in v2.5.5+ :)

cyberhypnotic 01-22-2006 09:06 PM

MrZeropage, could you tell me which part of the code deals with sorting? Maybe I can take a look at it and if it looks doable for me, I can alter it to disable the sorting.

I can just comment out the sorting portion of the script.

Reece^B 01-23-2006 04:19 PM

Okay cheers mr.zeropage!

MrZeropage 01-23-2006 07:51 PM

@cyberhopnotic:
Here is the Code that generates the Tournament-View:
Code:

for($i=1; $i<=$numrungs; $i++) {
$DB->query("SELECT m.name, t.timesplayed, t.rungscore, t.mid, t.rung, t.faceoff FROM ibf_tournament_players as t, ibf_members as m WHERE t.tid=".$tid." AND t.rung=".$i." AND m.id=t.mid ORDER BY t.faceoff ASC");
$ctr=0;
$refctr = 0;
while($refctr <= 7) {
$playerinfo[$refctr]['name'] = "";
$playerinfo[$refctr]['timesplayed'] = 0;
$playerinfo[$refctr]['rungscore'] = 0;
$playerinfo[$refctr]['playlink'] = "";
$refctr++;
}
while($row = $DB->fetch_row()) {
if(($ctr == 0 || $ctr == 1) && $row['faceoff'] == 2) {
$ctr = 2;
}
$playerinfo[$ctr]['name'] = $row['name'];
$playerinfo[$ctr]['timesplayed'] = $row['timesplayed'];
$playerinfo[$ctr]['rungscore'] = $row['rungscore'];
if($row['timesplayed'] < 3 && $ibforums->member['id'] == $row['mid']) {
$playerinfo[$ctr]['playlink'] = "<a href='".$ibforums->base_url."act=Arcade&do=playtourney&gameid=".$tinfo['gid']."&tid=$tid&rung=".$row['rung']."'>".$ibforums->lang['play']."</a>";
} else {
$playerinfo[$ctr]['playlink'] = "";
}
$ctr++;
}
$this->output .= $this->define_ladder($i, $playerinfo);
}

I marked the Query+Sorting.

As you see the concept seems to be the problem, as it is sorted by "faceoff" (Match1, Match2 ...) which is ok but is not looking up in which faceoff/Match this player was in the last round ("rung").

I guess this can only be solved by one additional query ...


All times are GMT. The time now is 03:05 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02185 seconds
  • Memory Usage 1,743KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete