DJLunacy - what version of UBB are you running. If your ubb_library.pl does not have the "get_cookie" subroutine in it, you'll need to add the following line with the other requires at the beginning of any script that you put a "&WriteUserSession" call in:
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.