SRL Archive - Help

[Compiling Error] "Type mismatch"; WTF.


RuneBots

2011-11-22 19:54:12

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

2011-11-22 20:05:09

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

2011-11-22 20:48:24

From: Nava2
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.