Forum

> > CS2D > Scripts > Function changemap
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Function changemap

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Function changemap

Kinger_money
User Off Offline

Zitieren
function changemap(mapname)
parse('changemap "..mapname.."')
end
5× editiert, zuletzt 13.07.14 17:17:01

alt Re: Function changemap

DC
Admin Off Offline

Zitieren
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

alt Re: Function changemap

Kinger_money
User Off Offline

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

alt Re: Function changemap

DC
Admin Off Offline

Zitieren
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")
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht