Put this at the end of the LM339 file! It is pretty self explanatory. The order is for KiCad if they have not changed something inside. In my exp you have to place all units in the schematic even if you do not use them otherwise it can do weird errors.
When you selected “LM339_QUAD” in the simulation model click ok then open it again to see pins are in the correct order.
.subckt LM339_QUAD U2_out U1_out Vpoz U1_inv U1_noninv U2_inv U2_noninv U4_inv U4_noninv U3_inv U3_noninv Vneg U3_out U4_out
XU1 U1_noninv U1_inv Vpoz Vneg U1_out LM339A
XU2 U2_noninv U2_inv Vpoz Vneg U2_out LM339A
XU3 U3_noninv U3_inv Vpoz Vneg U3_out LM339A
XU4 U4_noninv U4_inv Vpoz Vneg U4_out LM339A
.ends LM339_QUAD