I am working for a studio that is creating a game in Gamemaker, I have only ever worked in Unity and Unreal so a bit of a learning game for me. I keep getting errors saying that my banks cant be found. Yet I can see them in the engine and when pushing changes on git.
any help would be greatly appreciated!!
here is my code for reference to the errors I am receiving
show_debug_message(“Obj_Fmod::Create”)
var _max_channels = 1024;
var _flags_core = FMOD_INIT.NORMAL;
var _flags_studio = FMOD_STUDIO_INIT.LIVEUPDATE;
#macro FMOD_OK 0
#macro USE_FMOD_STUDIO true
#macro USE_DEBUG_CALLBACKS true
if (USE_DEBUG_CALLBACKS) {
fmod_debug_initialize(FMOD_DEBUG_FLAGS.LEVEL_LOG, FMOD_DEBUG_MODE.CALLBACK);
}
if (USE_FMOD_STUDIO) {
// creating and initialize FMOD Studio system
fmod_studio_system_create();
show_debug_message("fmod_studio_system_create: " + string(fmod_last_result()));
fmod_studio_system_init(_max_channels, _flags_studio, _flags_core);
show_debug_message("fmod_studio_system_init: " + string(fmod_last_result()));
if (!fmod_studio_bank_is_valid("vta mother.bank")) {
show_debug_message("Gamemaker makes my head hurt");
} else {
show_debug_message("I will work for you");
}
fmod_main_system = fmod_studio_system_get_core_system();
show_debug_message("fmod_studio_system_get_core_system: " + string(fmod_last_result()));
// loading sound banks
var bank_path = fmod_path_bundle("vta sfx.bank");
var bank_ref = fmod_studio_system_load_bank_file(bank_path, FMOD_STUDIO_LOAD_BANK.NORMAL);
show_debug_message("bank load result for vta sfx.bank: " + string(fmod_last_result()));
var strings_bank_path = fmod_path_bundle("vta mother.strings.bank");
var strings_bank_ref = fmod_studio_system_load_bank_file(strings_bank_path, FMOD_STUDIO_LOAD_BANK.NORMAL);
show_debug_message("bank load result for vta mother.strings.bank: " + string(fmod_last_result()));
//retieve event counts, I want to see if it can even find this
var event_count = -1;
if fmod_last_result() == FMOD_OK {
event_count = fmod_studio_bank_get_event_count("bank_ref");
show_debug_message("event count in bank: " + string(event_count));
} else {
show_debug_message("error loading bank, cannot retrieve event count");
}
// getting event description and creating instance
var event_description_ref = fmod_studio_system_get_event("event:/char/player/atk/sword/cut_attack");
//the line above this may be the cause of the problem
//i
show_debug_message("event load result: " + string(fmod_last_result()));
var event_description_instance_ref = fmod_studio_event_description_create_instance(event_description_ref);
//this line spits out an error.
// "[ERROR] fmod_studio_event_description_create_instance :: Invalid fmod type, type not compatible with extension call."
show_debug_message("event instance creation result: " + string(fmod_last_result()));
//this spits out -1;
// start event instance
fmod_studio_event_instance_start(event_description_instance_ref);
show_debug_message("event instance start result: " + string(fmod_last_result()));
var _player_atk = fmod_studio_system_get_event("event:/char/player/atk/sword/cut_attack");
fmod_studio_event_instance_start(_player_atk)
}