SRL Archive - Help and Support

Type Mismatch?


Daniel

2012-03-22 05:34:17


var
curCode: Word;
begin
curCode := 1 shl ((SizeOf(Word) shl 3) - 1);

I really can't see any problems in that. It occurs irrespective of the data type, so there are no overflow errors.

Please help poor ol' Daniel? :)

Cheers. :)

Jagex_Fagex

2012-03-22 05:38:39

What exactly is Word? is that meant to be a string?

EDIT: Word as in

SizeOf(Word) 

mixster

2012-03-22 10:51:41

In PascalScript, SizeOf doesn't take Integer/Word etc. but you can pass it a variable of that type. So, SizeOf(curCode) works while SizeOf(word) doesn't. LAPE for the win!

Jagex_Fagex

2012-03-22 22:49:28

From: mixster
In PascalScript, SizeOf doesn't take Integer/Word etc. but you can pass it a variable of that type. So, SizeOf(curCode) works while SizeOf(word) doesn't. LAPE for the win!


We figured it out on IRC mixster :P.

mixster

2012-03-23 08:03:00

From: Jagex_Fagex
We figured it out on IRC mixster :P.


Thanks, for a minute there I thought I was being helpful.