Forum

> > CS2D > Scripts > Function changemap
Forums overviewCS2D overview Scripts overviewLog in to reply

English Function changemap

4 replies
To the start Previous 1 Next To the start

old Function changemap

Kinger_money
User Off Offline

Quote
function changemap(mapname)
parse('changemap "..mapname.."')
end
edited 5×, last 13.07.14 05:17:01 pm

old Re: Function changemap

DC
Admin Off Offline

Quote
Maybe you specified the wrong map name. Take a look at the console after trying to load the map. What does it say? How are you calling the function?

Also: Won't work for maps with white spaces in the name. This should fix white space problems:
1
2
3
function changemap(mapname)
	parse('changemap "'..mapname..'"')
end

old Re: Function changemap

Kinger_money
User Off Offline

Quote
DC, LUA ERROR: sys/lua/autorun/autorun.lua:2: attempt to concatenate local 'mapname' (a nil value)
i use map de_dust

old Re: Function changemap

DC
Admin Off Offline

Quote
You're calling changemap without specifying the parameter (mapname) correctly. That's why I asked you how you're calling it.

Example of a correct call:
1
changemap("de_dust")
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview