ARB_vertex_program Invalid header error

Hey

I’m trying to convert my working GLSL shader system to oleder ASM based shader system, using ARB_vertex_program. But
“glProgramStringARB” throws me an error.
“line 1, column 1: Error: invalid vertex program header”

The code for setting up the vertex shader:
[b]shadertext:string;
thevertprogram:Gluint;

glEnable(GL_VERTEX_PROGRAM_ARB);
glGenProgramsARB(1,@thevertprogram);
glBindProgramARB(GL_VERTEX_PROGRAM_ARB,thevertprogram);
glProgramStringARB(GL_VERTEX_PROGRAM_ARB,GL_PROGRAM_FORMAT_ASCII_ARB,length(shadertext)-1,PChar(shadertext));

//Errorcheck
showmessage('Error ’ + inttostr( glGeterror() ));
ErrorStr := glGetString(GL_PROGRAM_ERROR_STRING_ARB);
ShowMessage(ErrorStr);[/b]

My test vertex shader:

[b]!!ARBvp1.0
ATTRIB pos = vertex.position;
PARAM mat[4] = { state.matrix.mvp };

Transform by concatenation of the

MODELVIEW and PROJECTION matrices.

DP4 result.position.x, mat[0], pos;
DP4 result.position.y, mat[1], pos;
DP4 result.position.z, mat[2], pos;
DP4 result.position.w, mat[3], pos;

Pass the primary color through w/o lighting.

MOV result.color, vertex.color;
END[/b]

The error message complains about the header “!!ARBvp1.0”, so the rest of the shader shouldn’t even matter. As far as I know the header is correct. What might be the problem?

I would really appreciate any help

Just in case: I’m using opengl with SDL

Okay, problem solved, the header was offset by one space