Need Help with Karting Microgame Tutorial

I’m just starting to explore FMOD so i’m currently working through the “Karting Microgame” tutorial here on the FMOD website. I have 0 experience with code so i’m pretty confused with a few of the steps where i’m supposed to delete lines in the code.

Step 42 of the tutorial says to "Delete all of the calls to PlaySound", which is what i’ve tried to do, but i now have the error “Assets\Karting\Scripts\UI\ObjectiveToast.cs(171,6): error CS1513: } expected” and it seems i can’t press play until i’ve fixed the error.

Does anyone know exactly what lines of code i’m supposed to delete here? I have no idea what “calls” and some other coding words mentioned in the tutorial mean and i’m having trouble finding answers from google. I’m also unsure about steps 29, 34 and 38.

Sorry for the extremely noobish question but as i said i have pretty much no clue when it comes to coding.

Here’s the link to the tutorial: https://www.fmod.com/unity-integrate#:~:text=to%20PlaySound

1 Like

Calls is a programming term for “starting a function”. When step 42 states to delete all of the calls to PlaySound, it means to delete any command calling the PlaySound() function. From the error it looks like what you have deleted has caused either a semi colon to also disappear or something similar. Are you able to post all the code in ObjectiveToast.cs for us to take a look?

I have the very same issue. I work with sound and even though I know some programming basics I was not able to pass steps 26-42 correctly. All I get are errors in console. Is there a way how to actually download correctly modified files? Thank you!

This is waht I get:

Error: Component of type FeedbackFlashHUD on GameObject GameHUD expected to find an object of type UnityEngine.AudioSource in the scene, but none were found.
UnityEngine.Debug:LogError(Object)
DebugUtility:HandleErrorIfNullFindObject(Object, Component) (at /private/var/folders/bp/2qfw5p597mx4d_g333cb1g080000gn/T/33809f04b402b4f8b839893e96029bcf/Assets/Karting/Scripts/Utilities/DebugUtility.cs:20)
FeedbackFlashHUD:Start() (at /private/var/folders/bp/2qfw5p597mx4d_g333cb1g080000gn/T/33809f04b402b4f8b839893e96029bcf/Assets/Karting/Scripts/UI/FeedbackFlashHUD.cs:40)

It looks like you may be talking about the expected errors that are part of the tutorial - see the grey box.

Hey Skritsarn did you finally manage to sort this out? I’m having the exact same problem!

Aleks

Have you tried the steps 26+ as mentioned in the tutorial above?

Hey Richard,

Yup I’ve been following the tutorial - for me personally it’s step 42 which seems to be the problem, everyone seems to have a different answer for this! But then as a result after trying all sorts of variations, it made me start to question whether I did step 38 right as well? Although step 38 seems a little more straight forward.

29 and 34 are obviously completely clear as they instruct you to simply delete the lines which contain the specific words.

This is an absolutely mind boggling beginners tutorial! If anyone has actually completed this I will send you a packet of hob knobs in the post if you can help guide me through 42?! :smiley:

Step 42 says "Delete all of the calls to PlaySound. This means you’re going to look through your entire project and delete anything that makes a call to PlaySound(). Open up Visual Studio and press Ctrl+F. In the find dialog type “PlaySound” and ensure it is looking through the entire solution. Delete the whole line wherever you find the PlaySound function being called.

image

Currently FMOD can only accept chocolate Hobnobs as company policy.

Thanks Richard! I’ll try have a look at this, this weekend and let you know if it works.

Carrier pigeons are on their way with chocolate Hobnobs.

I’m also having the exact same problem on the same tutorial step. My error occurs on Step #38 as well. Where I’m supposed to “Delete the contents of the CreateSFX function.” within the AudioUtility Script. Once I delete the script lines 17-30, which looks to be the entirety of the CreatSFX Function, I can no longer Play the game and get Compiler errors.

For reference I’m on MacOSCatalina using a newly downloaded Unity 2019.4.17f1 version.

I even consulted my coder friend and he simply recommend typing “//” at the beginning of each line instead of deleting and even instructed me to do that for the same 17-30 script lines, which is the whole function he says. Still the same issue, won’t play and has Compiler issues.

I have gotten as far as tutorial set #42 as well, in the ObjectiveToast, but the same issue is present when deleting or “//” any of the PlaySound lines.

Here’s a screen shot of the function lines I typed “//”. I also deleted those same lines with the same Compiler issues FYI.:

Can I simply skip these Utility and ObjectiveToast steps so I can proceed to the parts that actual deal with Fmod and creating audio???

Thanks!

Typing // in C# tells the compiler “ignore everything on this line after this point”. What has happened in your screenshot is that you have told the compiler to ignore the function declaration (the public static void CreateSFX() part) but not everything after in the curly braces. Since it does not have the function declared beforehand, the compiler does not know what to do with the curly braces, and that’s why the errors are appearing.

Step 18 calls for you to delete the contents of the function. You would need to put // at the beginning of every line between 19-29 in order to ignore (ie. soft delete) the CreateSFX function. What this does is makes sure any place CreateSFX() is called nothing happens. This saves time going through all of the project deleting anywhere this function touches.

I am also having quite a bit of trouble doing this tutorial. The steps are a little unclear and could be made clearer with some screenshots!

I’m finding that no matter which way I remove stuff, I always end up with errors I cannot correct. Even from the first script editing: “9. Delete all the lines that contain m_audioSource.”

I have somehow done it, literally 40mins after spending a good part of a day and posting on the forum here.

Thanks for taking the time to try explain the process to the non-coders! I think any additional screenshots always help, for future reference.

1 Like