Hey guys,

I can't get my code to compile. it says:

[Pascal Error] n3d_shaderprogram.pas(184): E2018 Record, object or class type required
[pascal]
procedure Test(const a: TVector4f);
var
d: Single;
begin
d := a.x; //error here
end;
[/pascal]

Defined in another unit:

[pascal]
PVector4f = ^TVector4f;
TVector4f = record
case Boolean of
true: ( x, y, z, w: Single; );
false: ( xyzw: array [0..3] of Single; );
end;
[/pascal]

It works for TVector2f and TVector3f. Only TVector4f makes problems.

I cant test it in Delphi 2010 because the SDL unit won't compile there (I don't think I can reproduce it by just isolating these routines... I tried that).

I tried compiling with lazarus. But it didn't help. It gave the following error:
G:\n3d\workingdir\src\n3d_shaderprogram.pas(184,9) Error: Illegal qualifier
Any ideas? I'm really stuck here.