Help - Search - Members - Calendar
Full Version: There is no } in null.
Banzai Forums 7.0 > Banzai Public Forums > Mechwarrior Help Center
Wildcard
I've been seeing a lot of people getting the "There is a missing } in null." error lately. I'm not sure why, but if you don't know what this is or how to fix it, it can be insanely frustrating. So I thought I'd go ahead and post the solution here and make it a sticky, so everyone who's having the problem won't have to search for a solution every time.
Wildcard
Basics
There are these files in Program Files/Microsoft Games/Mechwarrior Mercenaries/RESOURCE/Missions and UserMissions called .nfm files. There is a separate .nfm file for every map you have installed, and they contain game settings and parameters for different games that are used on that map if you're hosting. If you're not running a dedicated server or hosting, then they are completely useless and serve no function whatsoever, but you've still got to have them, and when they get screwed up, it will completely hork your game.

The game ships with an .nfm editor program in your Mercs directory, but you should never, ever use this. The editor doesn't support a lot of the newer gametypes and changes that the user community has made to the game, and opening an .nfm with it will completely screw up those changes. Instead, .nfm files should only be edited with a basic text editor like Notepad.

The contents of an .nfm file will have a lot of entries that look like this:
CODE
Banzai={
[server]
    ruleset=$(StockTeamBattle)
    name=Ronin
    teamAllowed=1
    teamcount=2
    scenariotext=resource\missions\tbat.txt
    respawnLimit=0
    isNight=0
    weather=1
    radarmode=0
    onlyStockMech=0
    gameLength=30
team_0={
[teamdata]
    Skin=&
}
team_1={
[teamdata]
    Skin=d
}
}


Makes your head hurt, doesn't it? OK, let me explain. Let's say I pulled this entry out of the .nfm file for the map Factory. (so the filename would be Factory.nfm in my Missions directory) If I'm hosting, and choose Team Battle as the gametype, then a list of maps will come up. If I scroll down that list and select Factory - Ronin from that list (see where it says 'Name=Ronin' above?) then in effect, what I'm doing is choosing Factory as the map, and this set of restrictions to use with it.

Here's what each entry means:
ruleset=$(StockTeamBattle) (this sets the scoring system for the drop)
name=Ronin (name of the ruleset)
teamAllowed=1 (are teams allowed? 0 = No. 1 = Yes. So in this one, yes - teams are allowed)
teamcount=2 (how many teams are allowed? 2)
scenariotext=resource\missions\tbat.txt (this is the text the server will show under the map tab in the lobby)
respawnLimit=0 (is there a limit to respawns? No.)
isNight=0 (is it night? No.)
weather=1 (Is the weather turned on? Yes.)
radarmode=0 (radar is normal)
onlyStockMech=0 (Are stock 'Mechs required? No.)
gameLength=30 (How long is the drop? 30 minutes)

There are quite a few other things you can specify with .nfm files, like visibility (clear, light fog, heavy fog, etc.) and some other things, but that's enough to give you a basic idea. Anything that doesn't have an entry will be at the map's default setting. So in this example, since there isn't an entry for visibility, it will automatically be set to the default for that map.

Now, remember up there where we said teams were allowed on this map? Well, immediately below that section in our .nfm entry we can specify different settings for each team:
team_0={ (here's the info on the first team - team_0 = Team 1 in the game)
[teamdata]
Skin=& (team 1 will be wearing the skin that corresponds to this symbol)
}
team_1={ (here's the info on the second team)
[teamdata]
Skin=d (team 2 will be wearing the skin that corresponds to this symbol)
} (this bracket closes the data entry for team 2)
} (and this bracket closes the data entry for the entire Ronin ruleset)

In this example, the only parameter I've specified for the two teams is different skins, but you can use the teamdata section to impose player limits, different tonnage or 'Mech limits for each team, all sorts of stuff.


A typical .nfm file will have about a dozen different entries that look pretty similar to this one. All will have a different ruleset name (this one is named Ronin, because it's the one we run on our server most of the time) and all will correspond to the specific map that this .nfm file is for.
Wildcard
The Fixes
Now that you understand a little bit about .nfm files, what they're for and where they're at, you are ready to fix the one that's giving you your error message and preventing your game from running.


Solution 1
If you recently installed a map you downloaded from somewhere, then it's almost certain that the download got corrupted somehow and the .nfm file got horked. By far the easiest solution to your problem is to re-download and re-install that particular map. Most of the time that will fix your problem and the game will run fine after that. If it doesn't, then we go on to the hard part.

Solution 2
99% of the time when an .nfm file gets horked, it's because one of the '}' brackets got deleted. For some reason, it's almost always one of the two brackets under the team data section. Remember, the team data section of a ruleset looks like this:
CODE
team_0={
[teamdata]
    Skin=&
}
team_1={
[teamdata]
    Skin=d
}
}

See those two 'closing' brackets there at the bottom? The first one closes the teamdata section for the second team. The second one closes the entire Ronin ruleset. If that second bracket isn't there, on any ruleset with teamdata, then you'll get the "There is no } in null" error message, and your game won't work.

It's important to mention here that most rulesets don't have any team data attached to them. Most rulesets will look like this:
CODE
Banzai={
[server]
ruleset=$(StockTeamBattle)
name=Ronin
teamAllowed=1
teamcount=2
scenariotext=resource\missions\tbat.txt
respawnLimit=0
isNight=0
weather=1
radarmode=0
onlyStockMech=0
gameLength=30
}


But if the map designer (or server host) wants to do something like specify something other than default skins for each team, then they have to use that teamdata section, which makes the ruleset look like this:
CODE
Banzai={
[server]
    ruleset=$(StockTeamBattle)
    name=Ronin
    teamAllowed=1
    teamcount=2
    scenariotext=resource\missions\tbat.txt
    respawnLimit=0
    isNight=0
    weather=1
    radarmode=0
    onlyStockMech=0
    gameLength=30
team_0={
[teamdata]
    Skin=&
}
team_1={
[teamdata]
    Skin=d
}
}


Notice the two closing brackets on the bottom? That is most likely where your problem is. If there's only one, your game won't run.


So, to fix this, what you need to do is go to Program Files/Microsoft Games/Mechwarrior Mercenaries/RESOURCE/Missions and UserMissions. Open those .nfm files one at a time with Notepad and scroll through them, looking for any ruleset with team data that does not have two brackets on the bottom. If you find one like that, enter a second closing bracket, save the file with changes, and try to run your game and see if that fixed it. There are a lot of .nfm files, so I usually suggest starting with the files that are assigned to any maps you recently downloaded. If that doesn't work, you may just have to go through all of them in both Missions and UserMissions one by one to find the problem.
Wildcard
I hope all of that helps. If you have any questions or problems, or if this doesn't solve that error for you, then please feel free to post below, and I'll do the best I can to help you out.
Lonewolf
I think that when Wildcard states "one of the '{' brackets", he meant "one of the '}' brackets."

Also, it might be helpful to reply to this post with any specific map/.nfm file that you found which caused this problem. Also, please mention which site you downloaded the file from to check if the source download is the problem.
Wildcard
Fixed. Thanks for applying your abundant anal retentiveness on our behalf, Wolfy. cool.gif
Jagged
It is one of the OSG (Old Stomping Grounds) maps. Took a ton of map swapping to figure that out. I don't know which one... I'll just do without.. I couldn't find the missing } in the .nfm. myself, but I didn't look too hard. I'm not fond of anything that even resembles coding.. Used to be good at it, and now it just makes my brain throb.
Lonewolf
QUOTE (Jagged @ Mar 16 2005, 12:29 AM)
It is one of the OSG (Old Stomping Grounds) maps.  Took a ton of map swapping to figure that out.  I don't know which one...  I'll just do without..  I couldn't find the missing } in the .nfm. myself, but I didn't look too hard.  I'm not fond of anything that even resembles coding.. Used to be good at it, and now it just makes my brain throb.

I just downloaded and checked the OldStompingGrounds-Missions.exe and OSGMissionPlay.exe from MWL, and the .nfm files were fine.

Do you remember from which site you downloaded your OSG files?
Jagged
Actually, I have to apologize. It is not the OSG maps. It is Richard Victory's all maps and missions bundle. It took more map switching (after being booted from an NBT server for not having NB-cerebrus) to figure this out, and I am sorry for jumping to conclusions. However, I've downloaded the TV and RV maps separately, and there seems to be no issue. It is only with the full maps bundle from Terra Valhallis.
Wildcard
I haven't had the chance to verify this personally, but I forwarded your report on to RV. I'm sure he'll look into it.
Beelzebub
i appreciate you finding the problewm here...but i'm not sure what to do...i've tried what u've said but there are WAY to many maps to look tho...now i was playing with a NFM and INI editor i downloaded off the evil bot forums here but i went through all the maps i was editing and checked them all they seemed normal...i also went thro the MW4 monitor standard NFM editor that i've never had problems with and set all the maps i changed back to normal and saved, and also maps i changed with the original mercs NFM editor and fixed those as well...still no luck...idk what to do...n e suggestions?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.