ok, using the error("this is a test, press ok to continue, cancel to exit"); method, I was able to isolate the line of code the produces the error. Thanks for that by the way!

However, I still don't have a fix. I think this line of code calls up another function so the error must be there, right? Here's the line:
effect(fire_effect, trpg_staff_fire_particles_per_frame, fire_coords.x, nullvector);