ok
For instance this bit:
// Stroke of luck
if ( Ticks mod 9000 = 0 ) or ( manualstroke = 1 ) then
begin
manualstroke := 0;
lastval := 1000;
UpdateActivePlayerList( );
// get player with the lowest score
for a := 1 to numplayers do
begin
if ( GetPlayerStat( activeplayerlist[ a ], 'Kills' ) < lastval ) then
begin
lastID := activeplayerlist[ a ];
lastval := GetPlayerStat( lastID, 'Kills' );
end;
end;
// give a vest to the biggest loser!
WriteLn('Stroke of luck! Vest given to: '+IDToName( lastID ) );
WriteConsole(0, 'Stroke of luck for player ' + IDToName( lastID ), $FF1E90FF);
DrawText(lastID, 'Stroke of luck! Free bulletproof vest.',400, RGB(255,255,254), 0.9, 20, 370 );
SpawnObject(GetPlayerStat(lastID,'x'),GetPlayerStat(lastID,'y'),19);
end;
When I'm the one getting the vest there's a risk of getting an access violation. Getting rid of all the drawtexts just gets rid of the access violations instantly, so it must have something to do with that. Activeplayerlist[ a ] contains all the player ID's btw. The array has been declared statically, and I tried oversizing it to be on the safe side.
Also I'm not 100% sure about this, but the problem doesn't seem to occur when the text written is bright red (255,255,0).
The whole script is well over a thousand lines so I won't post that up :p
Oh also note, that it's not the server throwing the error actually. It's soldat.exe!