Log in

View Full Version : [Compiling Error] "Type mismatch"; WTF.



RuneBots
11-23-2011, 12:54 AM
I've tried everything; I've installed all the correct plugins and moved them to the plugins folder manually, and I've even downloaded the prision pete.dll file and placed it there. However, I keep getting this error whenever I try to compile a script, and it's really pissing me off.

Error:


Type Line File Message
Compiling error 722 mapwalk.scar Type mismatch


Line 722: where it's telling me the error is..


722 Radius := Max((x2-x1)/2, (y2-y1)/2);


What could the error be? :duh:

Nava2
11-23-2011, 01:05 AM
Max wants integer values, you're giving it floats!

Try:
Radius := Max((x2-x1) div 2, (y2-y1) div 2);

E: Since its in SRL, I would advise updating, as it has probably been fixed.

RuneBots
11-23-2011, 01:48 AM
Max wants integer values, you're giving it floats!

Try:
Radius := Max((x2-x1) div 2, (y2-y1) div 2);

E: Since its in SRL, I would advise updating, as it has probably been fixed.

Thanks, that worked. I fixed that however afterwards when I compiled, I got this error:

0.