You can't use argument0 outside of function. Above code is now in general scope, and is performed at start of game (probably even before GameStart event). As such, argument0 is not known as variable in this context.
You probably want to convert it into function.