Jump to content

Help! Interval is empty?


Recommended Posts

Posted (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 by Guest

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted
Where is the map list ? is it in another file ?

dont you read?

  
local MapTable = exports.mapmanager:getMapsCompatibleWithGamemode( exports.mapmanager:getRunningGamemode() ) 

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted
Right you have to make the map manager to sort the map table, in order for you to call randoms from it.

Hows that?

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted

Have you tried checking what "MapTable" contains?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted

Your resource name has to be called "Battlefield 3" if I'm right.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted

If it's "BF3" the game mode resource name, then change it on the map too, instead of "BattleField 3" put "BF3".

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted

What did you change in the map?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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.

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

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