You need to add something like if not guid or guid == '' then return end to the top of the _RelevantPet function to just exit if there's no guid.
The error is being caused by the guid being an empty string which is one of the only things I didn't make an exception for in my example.
Actually, hang on I'll write something better because that will make it lose some of its functionality.
Last edited by semlar : 07-15-13 at 03:22 PM.
|