@Cerberus this seems to be working now after some changes to the code. So what happened was that it was erroring but I had written it wrongly. Thanks!