Troubleshooting
- My mode isn't in the list
- Run
mode-checkon it, or look forSkipped content filein the log. Check the file ends in.rmeg, not.rmeg.txt. The mode header: unknown field ...- A setting in the header's top level isn't one the game knows; the message lists those that are. Check the table, and that script settings sit under
[logic]. The mode header: unknown variant ...- A value isn't one of the names the message lists, such as a
modethat should beKingOfTheHill. Unknown game option for Slayer: rounds.nope- That name isn't a game option of this game type. See game options by name.
Round limit must be 1..=10- A game option's value is out of range.
1:1: Unterminated block comment- The header has no
]=]. The numbers are the line and column where it started. 3:1: Expected "end", found ""- A block isn't closed. The numbers are the line and column where the game noticed.
3:9: Assignment needs a writable typed variable or property- The statement assigns to a name that isn't a variable, such as one with no
alias. The numbers are where the statement starts; for a call or a condition of the wrong kind, where the call or the condition's test starts. Deployment classes require rounds.teams = 1- Add
"rounds.teams" = 1under[options]. Every deployment team needs an unlimited free class- Give each team a class with
cost = 0and nomax_active. team_count must match the deployment's teams- A mode with classes has as many teams as its
teamslist. Dropdeclare team_count, or make them match. Scripted modes require an unpacked multiplayer game variant (not Forge or campaign)- Choose a multiplayer game type. Campaign and Forge can't be scripted.
Scripted modes control player size; clear the world player scale- Remove
player_scale_percent, and useset_scalein the script. Assault can't have more than 8 teams- Only Slayer, Oddball, King of the Hill, VIP and Territories can. See game types.
Script exceeds 2 MiB- The script, stored with its source and settings, is too big. Shorten it: long comments count.
Halo 3 Megalith adapter does not implement: option:0ortraits:0- The script reads an option or trait set the header doesn't declare. Count options in alphabetical order.
Halo 3 Megalith adapter does not implement: spawn:zealot- That name isn't a body in the body list, a weapon, or one of the equipment, gun and vehicle names. Check its spelling, or use a tag path.
Halo 3 Megalith adapter does not implement: write.player.money- The script uses something the game does not play. Remove or replace it, even in a part that never runs.
Halo 3 Megalith adapter does not implement: player.get_deployment_points- That call needs classes in the header.
Unsupported Megalith API: Game.play_sound_for- That call doesn't exist. Check this page for the name.
A value-returning call needs an assignment or condition- Assign the result, even of
deploy_classandplace_at_me: see values and conditions. Comparisons take values, not action function calls- A call that gives nothing, an action, can't be compared. Compare a value, or a call that gives one.
Expected a condition function- Only the condition calls go alone in an
if; compare anything else, such asx != 0. break and continue belong in a for each loop- Use
returnto leave a function or an event; see branches. Global.Number[64] exceeds Reach variable capacity- There are fewer slots of that kind; see the variables table.
Timer rate must be a constant percentage- Write the rate as a value, such as
-100%, not a variable. Unknown button jump_twice: buttons are ability_1, ...- Use one of the names the message lists after
button.; see buttons in the script. give_equipment takes none or one of bubble_shield, ...- Write one of the names the message lists, such as
give_equipment(regenerator). A variable isn't accepted, and pickup names such asregenerator_pickupare forplace_at_me. is_button_held takes a button, such as button.ability_1- Pass a button by name, such as
button.ability_2, orpressed_buttoninsideon button press. Cannot create NEW.json: ...mode-compiledoesn't overwrite files. Pick a new--outputname, or move the old file away.game mode '...' stopped: This map has no object tag ...- The map doesn't load that tag. See tag paths; the log's
[modes]line lists what the map lacks. - The script stopped during a game
- Look in the host's log for
game mode '...' stopped:, the reason and the line and column it stopped at. Fix the file and start a new game, or, while you host alone, use/megalith reload. - The score goes up every moment
- Code outside
on initruns on every tick. Give points behind a timer or a change. - A timer fires only once
- Call
reset()andset_rate(-100%)again when it reaches zero. - The game goes on with one team left
- A mode that moves players between teams keeps its round going when one team is left. Give it a round-ending rule of its own, or on a dedicated server turn on
one_team_ends_scripted_games(Experimental): see teams and the game. - Traits flicker or don't stay
- Apply the trait set on every tick the player should have it.
- A HUD widget is empty or out of date
- Call
set_visibility, since widgets start hidden, callset_textorset_text_foragain when its numbers change, keep the text within 96 bytes and give a meter a maximum above 0. - A widget doesn't take clicks
- Open the player's menu with
set_ui_menu(true), give the widget a position, make it clickable and visible for that player, and add anon widget clickevent. - A key does nothing
- Check that the script has an
on button pressevent, that the player's key is bound under Game Mode Abilities, and that no chat or menu is open. - A
for each object with labelloop finds nothing on a Forge map - Check the label's spelling and capitals in the Forge menu's Properties, that the map was saved after Apply scripting, that you host the mode on that saved map, and that the labeled objects are spawned. See Forge objects by label.
declare team_count = 16still plays eight teams or fewer- Check the game type, and that it plays with teams.
- Players on Team 9 or later start anywhere
- A team past the first eight with no spawn points of its own starts at any start point. In Forge, give its starting points that team in their Team row.
- The script stops when it creates a body
- The model variant may not be one that body has; check the body list. The host's log says why it stopped.
- A body stays a Spartan
- The host lacks the body's campaign map.
- Nobody is ever in the zone
- Give the zone a position on your map and a size that fits; it has no visible edge.
- An object can't be created
- The map may not have it, or the script has 2,048 created objects already. Delete the ones it's done with.
- An invincible object disappears
- The game cleans up objects lying around:
set_garbage_collection_disabled(true). Kill boundaries still remove it. - My changes don't show in the lobby
- Save the file, choose Refresh, select the mode again and start a new game. While you host alone,
/megalith reloadreads the file again in the running game. The Megalith console is off.- Turn on Megalith console in Host Settings and host on this PC alone, with Network set to Local. See the Megalith console.
The game's log is Logs/client.log in your player folder; a dedicated server's is data/<server>/server.log. When you report a problem, include the .rmeg, the map and what happened.
