Game_Map itself refers to the class of Game_Map, a class in Ruby is not automatically initialized 'from the getgo' so to speak.
Each class that is referable has already been created. So, at the beginning of the 'game,' the game classes are created and assigned.
When referring to them, you use the assigned variable, rather than the class itself, so rather than using Game_Map.width, you'd use the variable that initialized it, in this case: $game_map.
Likewise with all other game_ classes; see line 115~125 of the Scene_Title script to see how the variables are assigned.
Secondly, this would not work in the Title scene because that is the scene in which Game_Map is initialized and assigned, you pretty much need to run your code separately after the game has fully loaded (like in a new scene after scene_title, or from the call script event command), yes, it's a hassle, but testing things like this in the title scene is not wise.
thirdly, the parameters, also known as arguments are simple to do, but there's several ways, first way, is simple argument passing:
CODE
class My_Class
def do_something(n,x,y)
# do something
end
end
When you create my class, like @classvar = My_Class.new you can later call do something like so: @classvar.do_something(n,x,y)
I won't go into much detail about the methods, so alternately, it looks like you're wanting to refer to an array, the way that is done is like so:
CODE
class Game_Actors
def [](actor_id)
return @data[actor_id]
end
end
Basically what this def is is that it's if Game_Actors is used as an array rather than def or class. this allows you to do functions like so:
$game_actors[n]
And this belongs in RGSS2 Script support,
moving ~Night5h4d3