A common error, try a search on this forum for more information.
It is usually caused by a bug (I guess) which causes the worldspawn entity to move to the bottom of the map file (it should be on top). If you open your map file in Notepad, you can edit the code manually to fix it (after making a backup!).
If you open battery_final.map (or goldrush for that matter if you haven’t got the source maps) you can see the following at the very top:
// entity 0
{
"_mingridlight" "56"
"_minvertexlight" "18"
"ambient" "18"
"_blocksize" "1024"
"gridsize" "256 256 128"
"_color" "0.8 0.9 1.0"
"classname" "worldspawn"
"mapcoordsmins" "-768 1664"
"mapcoordsmaxs" "7296 -6400"
"_fog" "textures/skies/sd_batteryfog"
(followed by a long list of brushes and patches)
As you can see, this is the worldspawn entity, and it’s on top.
You should open your map in notepad and find your worldspawn entity. Cut and paste everything of it to the very top of the file and it should work again! Be sure to include everything though (from the first opening brace {, to the last matching closing brace }).
If you can’t get it, show your map code here (in [code ][/code ] tags please!!) and we can help you.
EDIT
Interestingly enough, my own post (when I was still a noob hehe) comes up when I search for it:
http://www.splashdamage.com/forums/showthread.php?p=138860
It seems that it can also happen that your first entity is simply renamed to a different entity. If the first entity looks like it could be the worldspawn (it may have mapcoords set, and other key/values like in the battery map above) you could try renaming it to worldspawn ( “classname” “worldspawn”) instead of what it changed to.
Always make a backup first in case you screw it up (which is likely if you’re going to meddle in the code).