Hello, I have a line of code to change the map to the next map in maplist.txt, I have a variable equal to file.read for maplist.txt, then string.explode with
, which puts each map into it’s own table cell. I’m having issues however using that map to change the map. Here’s the console error:
CModelLoader::Map_IsValid: No such map 'maps/aim_47th_nightoftheshotgun.bsp' map load failed: aim_47th_nightoftheshotgun not found or invalid
Here’s my code for map changing:
function ChangeMap() for k,v in pairs(maplist) do if game.GetMap() == v then if maplist[k + 1] then RunConsoleCommand("map", maplist[k + 1] .. "") else RunConsoleCommand("map", maplist.. "") end end end end
I know for a fact that map exists, there’s no typos with it or anything. What could possibly be wrong here?!