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.