PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old November 3rd, 2002, 07:47 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
Script Help

I have this ladder script that I purchased and the Creator will not support or help me with a major bug in it.

What is happening is a team CHALLENGES another team to a battle on the Ladder. Then the Other Team RESPONDS to the challenge. Now if the ORIGINAL Team who made the challenge DOES NOT Finalize the match withing 48 hrs then the script executes a FORFEIT..but the problem is the script is creating the FORFEIT to the team that was challenged even tho they responded to the original challenge..it should give the fofeit to the Orginal Team because they didnt FINALIZE the match. I have found the section of code in the script that creates the forfeits..any help would be appreciated.

The Script is Running here:
http://www.squadgames.com/ladder_network

I really could use some help with this..It Gives a forfeit to the wrong team and after paying $400.00 for this script the creator wont help me and the script is Useless.
also if you need more files e-mail me at admin@squadgames.com I'll provide anything you might need
----------
php Code:
Original - php Code
  1.  
  2. //NEXT 2 FUNCTIONS DELETES AND AWARDS WINS FOR UNRESPONDED OR UNFINALIZED CHALLENGES
  3.  
  4.  
  5. function check_unrespondedchallenges(){
  6.  
  7. $challengeladders=mysql_query("SELECT id,respondhours,finalizehours FROM ladders WHERE challenge='1'");
  8. while(list($id,$respondhours,$finalizehours)=mysql  _fetch_row($challengeladders)){
  9.  
  10. $laterespond=date("Y-m-d H:i:s",time()-60*60*$respondhours);
  11. $latefinalize=date("Y-m-d H:i:s",time()-60*60*$finalizehours);
  12.  
  13. $challengeinfo=mysql_query("SELECT challid,challenger,challenged,ladderid,challengerr  ank,challengedrank,respondedby,finalizedby FROM challenges WHERE
  14. ladderid='$id' AND respondedby='0' AND finalizedby='0' AND challengedtime < '$laterespond' OR
  15. ladderid='$id' AND respondedby > '0' AND finalizedby='0' AND respondedtime < '$latefinalize'");
  16.  while(list($challid,$challenger,$challenged,$ladde  rid,$challengerrank,$challengedrank,$respondedby,$  finalizedby)=mysql_fetch_row($challengeinfo)){
  17.  
  18. //DIDNT RESPOND IN TIME or DIDNT FINALIZE IN TIME
  19. if(($respondedby=="0") && ($finalizedby=="0") || ($respondedby > 0) && ($finalizedby=="0")){
  20. create_forfeit($challid,$id,$challenger,$challenge  d,$challengerrank,$challengedrank);
  21. }
  22.  
  23. }
  24.  
  25. }
  26.  
  27. }
  28.  
  29.  
  30.  
  31. function create_forfeit($challid,$ladderid,$winnerid,$loser  id,$winrank,$loserank){
  32. global $dir, $file, $url, $out, $plyr;
  33.  
  34. $loserteaminfo=mysql_query("SELECT teamname FROM teams WHERE id='$loserid'");
  35. $lteam=mysql_fetch_array($loserteaminfo);
  36.  
  37. $winnerteaminfo=mysql_query("SELECT teamname FROM teams WHERE id='$winnerid'");
  38. $wteam=mysql_fetch_array($winnerteaminfo);
  39.  
  40. $ladderinfo=mysql_query("SELECT laddername FROM ladders WHERE id='$ladderid'");
  41. $linfo=mysql_fetch_array($ladderinfo);
  42.  
  43. $ip=getenv("REMOTE_ADDR");
  44. $tday=date("Y-m-d H:i:s");
  45.  
  46. if(!$wteam[teamname]){
  47. $wteam[teamname]="[DELETED]";
  48. }
  49.  
  50. if(!$lteam[teamname]){
  51. $lteam[teamname]="[DELETED]";
  52. }
  53.  
  54. /*
  55. //REPORT MATCH TO MATCH DATABASE
  56. mysql_query("INSERT INTO matchdb VALUES (
  57. '$challid',
  58. '$winnerid',
  59. '$loserid',
  60. '$wteam[teamname]',
  61. '$lteam[teamname]',
  62. '$ladderid',
  63. '$linfo[laddername]',
  64. '$winrank',
  65. '$loserank',
  66. '0',
  67. '0',
  68. '',
  69. '',
  70. '',
  71. '',
  72. 'Win by forfeit.',
  73. 'Loss by forfeit.',
  74. '0',
  75. '0',
  76. '$plry[id]',
  77. '$tday',
  78. '0.0.0.0',
  79. '$plry[id]',
  80. '$tday',
  81. '$ip');");
  82. */
  83.  

Reply With Quote
  #2  
Old November 5th, 2002, 08:11 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Script Help

Looks like nobody can help...havent found any forums yet out of the 12 I ha ve posted on that can solve this bug...if you need to see what this bug does I made this page with screenshots to better show it.

http://www.squadgames.com/legacy/ladderscript2_bug.php

Reply With Quote
  #3  
Old November 5th, 2002, 11:12 PM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: Script Help

if you paid him, and didn't get what you paid for, then take it to judge judy

Reply With Quote
  #4  
Old November 6th, 2002, 12:29 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Script Help

Been thru that..getting No Where except threats back from them.

anyone help please..it needs more code to make it work...could really use some help..i know nothing about this

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > Script Help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway