import is used to make a function/variable global. So if you don't need to call the gainExperience function from other scripts, then you don't need import at all.
Presumably, you are going to need to call it from other scripts though, so in the header (the
ASH file, not ASC) you can put the import:
import void gainExperience(int amount);
The function itself is defined in the script file (ASC), just like you have it, but without the "import".
void is the return type. That just means that you don't need the function to return any data back to wherever you're calling the function from. If you needed to return some data based on the result of the function, you could change the return type appropriately.
Oh, and you didn't really specify, but
DO NOT EVER, EVER, EVER, EVER, EVER DEFINE A FUNCTION INSIDE OF A SCRIPT HEADER (*.ASH) FILE!! That's what imports are for. I just wanted to make that clear. Functions and variables should
NEVER be defined in a script header. The import keyword lets you use that function/variable in other scripts.