Raised This Month: $ Target: $400
 0% 

TFC skills rank with speed run timer


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Lt Llama
Senior Member
Join Date: Aug 2004
Old 09-16-2006 , 04:41   Re: TFC skills rank with speed run timer
Reply With Quote #11

Ok, it was as I thought. This problem only occured in one place in the plugin.
I changed

Code:
        dbi_nextrow(resultMaps)         dbi_result(resultMaps, "curDate", qryFirstDate, maxFinishedMaps-1)         len1 += format(statsMotd[len1], 2047-len1,"First time you finished a map: %s^n",qryFirstDate)         while (resultMaps && dbi_nextrow(resultMaps) > 0)             dbi_nextrow(resultMaps)         dbi_result(resultMaps, "curDate", qryFirstDate, maxFinishedMaps-1)         len1 += format(statsMotd[len1], 2047-len1,"Last time you finished a map: %s^n^n^n",qryFirstDate)         dbi_free_result(resultMaps)

to

Code:
        dbi_nextrow(resultMaps)         dbi_result(resultMaps, "curDate", qryFirstDate, maxFinishedMaps-1)         new nRows = dbi_num_rows(resultMaps)         new incrRows = 1         len1 += format(statsMotd[len1], 2047-len1,"First time you finished a map: %s^n",qryFirstDate)         while (incrRows < nRows) {             dbi_nextrow(resultMaps)             ++incrRows         }         dbi_result(resultMaps, "curDate", qryFirstDate, maxFinishedMaps-1)         len1 += format(statsMotd[len1], 2047-len1,"Last time you finished a map: %s^n^n^n",qryFirstDate)         dbi_free_result(resultMaps)

In this way, as Bailopan said, I'm shure not to query an empty result set.
I was only interested in the last row in the result set. This is a better way to do it.

Thanks for helping out

/Lt.
__________________
A dodo: Used to describe someone without common sense and who always has the pathetic confused look on their face when a question is asked.
Lt Llama is offline
 



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 22:30.


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