Listing events in C API

Hi, I’m just trying to list all the events in a bank but I’m receiving error 74 (I think it means FMOD_ERR_EVENT_NOTFOUND), my code is this:

            ret=FMOD_Studio_Bank_GetEventCount(bank,  &count);                
            if(ret==FMOD_OK){
                FMOD_STUDIO_EVENTDESCRIPTION** events=new FMOD_STUDIO_EVENTDESCRIPTION*[count];
                memset(events, 0, sizeof(events));
                ret=FMOD_Studio_Bank_GetEventList(bank, events, count, &count);
                if (ret != FMOD_OK) {
                    cout << ret << endl;
                }
                for(int i=0;i<count;i++){
                    char eventPath[256];
                    int len=0;
                    ret=FMOD_Studio_EventDescription_GetPath(events[i], eventPath, sizeof(eventPath)-1, &len);
                    if(ret!=FMOD_OK){
                        cout << i << " " << ret << endl;
                    }
                    eventPath[len]='\0';
                    cout << eventPath << endl;
                }
                delete [] events;
            }

My program does enter in this if:

                    if(ret!=FMOD_OK){
                        cout << i << " " << ret << endl;
                    }

and that means that getEventCount and also GetEventList, both received FMOD_OK like return value.
Any idea what’s happening?

In order to lookup via path or retrieve the path of an event, you need to load the optional strings bank. If you haven’t renamed the master bank the strings bank will be called Master Bank.strings.bank and is loaded using the same functions as any other bank.

2 Likes