Jump to content

Help! Interval is empty?


Recommended Posts

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 by Guest
Link to comment
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:

Link to comment
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'

Link to comment
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 :shock:

  
<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> 
  

Link to comment

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".

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...