Hm, not sure what I'm doing wrong, but the CWRITE function keeps spitting out a "Random Value Invalid" error.. Doesn't seem to matter if its inline, subprogram or function..
DECL E6POS rPos
rPos.X = RandomInt(0,300)
DEFFCT INT RandomInt(Min:in, Max:in)
DECL INT Min
DECL INT Max
DECL INT Random
DECL STATE_T State
DECL MODUS_T Mode
CWrite ($Fct_Call, State, Mode, "krl_getRandom", Random, Min, Max)
Am I doing something wrong? I'm not so versed in Interface functions(?) or anything that uses more than the single .src file so might be fudging something up..