Change the line
void NoteMusic1(string &in asEntity, string &in asType)
to
void NoteMusic1(string &in asEntity)
You can write NoteMusic1 in either the PlayerInteractCallback, or the CallbackFunc. Depending on which callback you use, the arguments (such as
string &in asEntity and
string &in asType) change. The reason it didn't work is because we were saying to put it in the CallbackFunc, which is why we told you to write
string &in asEntity, string &in asType. Using PlayerInteractCallback will work the same (it's probably the better choice to use for this situation) as long as you change that one line.
Edit: Forgot to add this: The difference between CallbackFunc and PlayerInteractCallback, is that the function written for the CallbackFunc is used for several events (such as the player picking it up, it breaking, igniting). If you want to use this instead of PlayerInteractCallback, you would need your script to look like this:
void StartMusic(string &in asEntity, string &in asType)
{
if(asType == "OnPickup") {
PlayMusic("01_amb_darkness.ogg", true, 1, 0, 1, false); // will only play music if the player picks up the entity.
}
}
The function written for PlayerInteractCallback will only be used when the player picks the item up.