28.12.2011, 17:03
Does PAWN has variables scope? For example Local Variables and Global Variables.
new global_var;
function()
{
new local_var;
if(true)
{
new even_more_local_var;
}
}
//At Top
new A;
//At OnGameModeInit CB
A = 2;
//At OnPlayerSpawn CB
print(A); // Is the variable's A value still 2?
new var;
public OnGameModeInit() {
var = 2;
}
//var is always 2 unless changed now