Error 518 - "[...]" requires CDECL

"[...]" requires CDECL - You attempted to use the classic optional parameter syntax in a SUB or FUNCTION without declaring it to use CDECL calling convention ('C' style calling convention).