I get errors when using Documentation Strings.

import bge

def test(cont):
    
''' 
this stuff seems to give me errors
'''    

a = 1
print(a)

I’ve also tried using “”" instead of ‘’’.

Learn to read the errors printed to the console.

IndentationError: expected an indented block

is fairly self explanatory. Any time you have a line that ends with a colon, Python expects the line following it to be indented. Comments and white space are the only exception to this. Docstrings are not. They must match the indentation of the function’s contents.