It seems to fix this problem, implied volatility must not be calculated in the first initial run of the simulation, as shown below

Code:
if(!is(FIRSTINITRUN)) current_IV = contractVol(dtest,priceClose(),HistVolOV,con_value,Dividend,Interest);



I do not know why the program is able to run the contractVol function fine for PUT options, but not for CALL options at the start of the simulation, but the code above fixed the problem, at least for me.

Hope this helps!