I'm trying to make a gamemode but there's a bit of a problem when it first loads.
Loading Add-On: Gamemode_Slayer_JailBreak (CRC:-2009423028)
Executing Add-Ons/Gamemode_Slayer_JailBreak/server.cs.
Executing Add-Ons/Gamemode_Slayer/Main.cs.
Activating package: Slayer_Main
ERROR: File "/config_preload.cs" is not in one of the default directories
BackTrace: ->ServerSettingsGui::clickLaunchGame->createServer->onServerCreated->loadAddOns->Slayer::onAdd
Slayer Version
+ Compatible Version:
+ Core Directory:
+ Config Directory:
+ Debug Mode:
ERROR: File "/Support/support.cs" is not in one of the default directories
BackTrace: ->ServerSettingsGui::clickLaunchGame->createServer->onServerCreated->loadAddOns->Slayer::onAdd
ERROR: File "/Support/support.cs.dso" is not in one of the default directories
BackTrace: ->ServerSettingsGui::clickLaunchGame->createServer->onServerCreated->loadAddOns->Slayer::onAdd
Missing file: /Support/Support.cs!
Add-Ons/Gamemode_Slayer/Main.cs (31): Unable to find function Slayer_Support::LoadFiles
ERROR: File "/Preferences.cs" is not in one of the default directories
BackTrace: ->ServerSettingsGui::clickLaunchGame->createServer->onServerCreated->loadAddOns->Slayer::onAdd->Slayer::DeleteOldConfigFiles
ERROR: File "/Preload.cs" is not in one of the default directories
BackTrace: ->ServerSettingsGui::clickLaunchGame->createServer->onServerCreated->loadAddOns->Slayer::onAdd->Slayer::DeleteOldConfigFiles
ERROR: File "/server.log" is not in one of the default directories
BackTrace: ->ServerSettingsGui::clickLaunchGame->createServer->onServerCreated->loadAddOns->Slayer::onAdd->Slayer::DeleteOldConfigFiles
ERROR: File "/Dependencies/Preferences.cs" is not in one of the default directories
BackTrace: ->ServerSettingsGui::clickLaunchGame->createServer->onServerCreated->loadAddOns->Slayer::onAdd
ERROR: File "/Dependencies/Preferences.cs.dso" is not in one of the default directories
BackTrace: ->ServerSettingsGui::clickLaunchGame->createServer->onServerCreated->loadAddOns->Slayer::onAdd
Missing file: /Dependencies/Preferences.cs!
Add-Ons/Gamemode_Slayer/Main.cs (38): Unable to find function Slayer_Support::LoadFiles
Add-Ons/Gamemode_Slayer/Main.cs (39): Unable to find function Slayer_Support::LoadFiles
Add-Ons/Gamemode_Slayer/Main.cs (42): Unable to find function Slayer_Support::LoadFiles
Add-Ons/Gamemode_Slayer/Main.cs (45): Unable to find function Slayer_Support::LoadFiles
Add-Ons/Gamemode_Slayer/Main.cs (55): Unable to find function Slayer_checkBricks
Add-Ons/Gamemode_Slayer_JailBreak/server.cs (0): Unable to find object: '' attempting to call function 'addMode'
BackTrace: ->ServerSettingsGui::clickLaunchGame->createServer->onServerCreated->loadAddOns
Executing Add-ons/Gamemode_Slayer/Dependencies/Preferences.cs.
Add-ons/Gamemode_Slayer/Dependencies/Preferences.cs (400): Unable to find function Slayer_Support::getDynamicVariable
Add-ons/Gamemode_Slayer/Dependencies/Preferences.cs (379): Unable to find function Slayer_Support::setDynamicVariable
Add-ons/Gamemode_Slayer/Dependencies/Preferences.cs (381): Unable to find function Slayer_Support::debug
Add-ons/Gamemode_Slayer/Dependencies/Preferences.cs (400): Unable to find function Slayer_Support::getDynamicVariable
Add-ons/Gamemode_Slayer/Dependencies/Preferences.cs (379): Unable to find function Slayer_Support::setDynamicVariable
Add-ons/Gamemode_Slayer/Dependencies/Preferences.cs (381): Unable to find function Slayer_Support::debug
Add-ons/Gamemode_Slayer/Dependencies/Preferences.cs (0): Unable to find function Slayer_Support::debug
0 datablocks added.
Loading Add-On: Gamemode_Slayer (CRC:-220097412)
Executing Add-Ons/Gamemode_Slayer/server.cs.
Executing Add-Ons/Gamemode_Slayer/Main.cs.
Activating package: Slayer_Main
package Slayer_Main is already active
Slayer Version 3.7.4
0 datablocks added.
This is what I'm doing in the code (exactly what your documentation reference says):
// Init
if($Addon__Gamemode_Slayer == 1)
{
if(!isObject(Slayer))
exec("Add-Ons/Gamemode_Slayer/Main.cs");
if($Slayer::Server::Dependencies::Gamemodes)
exec("Add-Ons/Gamemode_Slayer/Dependencies/Gamemodes.cs");
Slayer.Gamemodes.addMode("JailBreak","JlBrk",1,1);
}
// Prefs
if(!$Slayer::Server::Dependencies::Preferences)
exec("Add-ons/Gamemode_Slayer/Dependencies/Preferences.cs");
Slayer.Prefs.addPref("JlBrk","Prisoner Team","%mini.JlBrk_prisonerName","string 50","Inmates",0,0,2,"Rules JlBrk Mode");
Slayer.Prefs.addPref("JlBrk","Guard Team","%mini.JlBrk_guardName","string 50","Guards",0,0,2,"Rules JlBrk Mode");