.:HyPeX:. Posted March 3, 2014 Posted March 3, 2014 (edited) hey guys.. im getting that the interval (math.random) is empty.. any idea whis is this? There's a map compatible with my gamemode.. so it should work local thisResource = getResourceRootElement(getThisResource()) local MapTable = exports.mapmanager:getMapsCompatibleWithGamemode( exports.mapmanager:getRunningGamemode() ) MapList = {} function onGameModeStart() MapList = {} for i, v in ipairs(MapTable) do table.insert(MapList, v) end local maps = #MapList local mapStart = math.random(maps) exports.mapmanager:changeGamemodeMap( MapList[ mapStart ] ) end addEventHandler("onResourceStart", thisResource, onGameModeStart) Edited March 4, 2014 by Guest
TrapLord Studios™ Posted March 3, 2014 Posted March 3, 2014 Where is the map list ? is it in another file ?
.:HyPeX:. Posted March 3, 2014 Author Posted March 3, 2014 Where is the map list ? is it in another file ? dont you read? local MapTable = exports.mapmanager:getMapsCompatibleWithGamemode( exports.mapmanager:getRunningGamemode() )
TrapLord Studios™ Posted March 3, 2014 Posted March 3, 2014 Right you have to make the map manager to sort the map table, in order for you to call randoms from it.
.:HyPeX:. Posted March 4, 2014 Author Posted March 4, 2014 Right you have to make the map manager to sort the map table, in order for you to call randoms from it. Hows that?
.:HyPeX:. Posted March 4, 2014 Author Posted March 4, 2014 Bump, can anybody tell me how to make this work?
.:HyPeX:. Posted March 4, 2014 Author Posted March 4, 2014 Have you tried checking what "MapTable" contains? The problem is that MapTable doesnt contain anything, its just emtpy when it should have the map.. And this is weird, becouse when i start the gamemode it starts with my map.. Gamemode Meta: Map Playing Meta:
Castillo Posted March 4, 2014 Posted March 4, 2014 Your resource name has to be called "Battlefield 3" if I'm right.
.:HyPeX:. Posted March 4, 2014 Author Posted March 4, 2014 Your resource name has to be called "Battlefield 3" if I'm right. why not "BattleField 3"? and if ur referring to the folder, it is "BF3" And now i started to randomly recive this messages instead of the normal Interval error on script startup: mapmanager_exports.lua:206: isMapCompatibleWithGamemode: Invalid Gamemode Resource mapmanager_exports.lua:69: Bad Argument @ 'getResourceName' mapmanager_exports.lua:69: attempto to concatenate a boolean value BF3_MapManager.lua:23: call: failed to call 'mapmanager:changeGamemodeMap'
Castillo Posted March 4, 2014 Posted March 4, 2014 If it's "BF3" the game mode resource name, then change it on the map too, instead of "BattleField 3" put "BF3".
.:HyPeX:. Posted March 4, 2014 Author Posted March 4, 2014 If it's "BF3" the game mode resource name, then change it on the map too, instead of "BattleField 3" put "BF3". Im still getting those 4 errors..
.:HyPeX:. Posted March 4, 2014 Author Posted March 4, 2014 What did you change in the map? Nothing, the map is still same since long time ago Edit: Idk why i now can see BF3 in Maps tab on admin panel.. this is the meta <meta> <info author="HyPeX" name="BF3" type="gamemode" version="1.0" /> <script src="BF3_Core_C.lua" type="client" cache="false" /> <script src="BF3_Vehicles.lua" type="server" /> <script src="BF3_MapManager.lua" type="server" /> <script src="BF3_MapManager_C.lua" type="client" cache="false" /> <script src="BF3_Models.lua" type="client" cache="false" /> <script src="BF3_Joiner.lua" type="server" /> <script src="BF3_Joiner_C.lua" type="client" cache="false" /> <script src="BF3_Core_S.lua" type="server" /> <file src="fonts/podium.ttf" /> <file src="fonts/BF3.ttf" /> <file src="fonts/asd.ttf" /> <file src="fonts/bhz.ttf" /> <file src="bf3cosas/bf3.mp3" /> <script src="BF3_WeaponSound.lua" type="client" cache="false" /> <script src="BF3_NameTags.lua" type="client" cache="false" /> <file src="sounds/Colt45.wav" /> <file src="sounds/Deagle.wav" /> <file src="sounds/Silenced.wav" /> <file src="sounds/Shotgun.wav" /> <file src="sounds/Sawed-Off.wav" /> <file src="sounds/Combat Shotgun.wav" /> <file src="sounds/UZI_Tec9.wav" /> <file src="sounds/MP5.wav" /> <file src="sounds/M4_AK47.wav" /> <file src="sounds/Rifle.wav" /> <file src="sounds/Sniper.wav" /> <file src="sounds/war.mp3" download="false" /> <file src="skins/army.dff" /> <file src="skins/army.txd" /> <file src="skins/swat.dff" /> <file src="skins/swat.txd" /> <file src="img/chapa.png" /> <file src="img/hud.png" /> <file src="img/TeamWon.png" /> <file src="img/Lobby.png" /> <file src="img/TeamLost.png" /> <file src="weapons/m4.dff" /> <file src="weapons/m4.txd" /> <file src="weapons/rocketla.dff" /> <file src="weapons/rocketla.txd" /> <file src="weapons/satchel.dff" /> <file src="weapons/satchel.txd" /> <file src="weapons/shotgspa.dff" /> <file src="weapons/shotgspa.txd" /> <file src="weapons/silenced.dff" /> <file src="weapons/silenced.txd" /> <file src="weapons/sniper.dff" /> <file src="weapons/sniper.txd" /> <min_mta_version client="1.3.1-9.04690"></min_mta_version> </meta>
Castillo Posted March 4, 2014 Posted March 4, 2014 That's not what I told you to change... type="map" version="1.0.0" gamemodes="BattleField 3"> "NoshairCannals.map" dimension="0"> "#maxplayers" value="[ 128 ]"> "#useLODs" value="[ false ]"> "#gamespeed" value="[ 1 ]"> "#minplayers" value="[ 0 ]"> "#gravity" value="[ 0.008000 ]"> "#waveheight" value="[ 0 ]"> "#locked_time" value="[ true ]"> "#weather" value="[ 0 ]"> "#time" value="5:10"> This: gamemodes="BattleField 3" Change "BattleField 3" to "BF3".
.:HyPeX:. Posted March 4, 2014 Author Posted March 4, 2014 It is still giving errors.. (those 4), and i can see as if BF3 was a map and not a gamemode. (Simply NoshairCannals cant find a gamemode parent to belong to) EDIT: Something was buged, a refreshall fixed it... Im still getting the interval error.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now