game makerってグローバル変数にローカルからアクセスできなかったですか?
これが駄目みたいです

var hoge = 10
function test(){
show_debug_message(hoge);
}