This is a bit older but just FYI for others as I found this script really useful so far. My RoF2 client seemed to return $empty here as -1. I didn't have a Titanium of UF client to test other versions but changing if($empty > 400000) to if($empty > 400000 || $empty == -1) resolves the cursor check and seems to operate as expected from my limited testing.
Thanks for sharing this!
|