28.11.2009, 20:23
Whatever you wish (within reason), it's just a statement. Once you have your statements sussed move onto loops (repeated statements kindof).
It's not exactly the same (seperate scopes) but it's kind of the same, the loop is doing the same thing but it runs one scope.
Also it would be a good idea to figure out the different types of variables we use (not programming types, types as in a subdivision).
We have a few in Pawn, to start with the basics:
Learn how to use them, consult the pdf and Wiki (or ******).
pawn Код:
for ( new i; i < 5; i ++ )
{
//some code
}
//is the same as
if ( i == 0 ) {/*some code*/}
if ( i == 1 ) {/*some code*/}
if ( i == 2 ) {/*some code*/}
if ( i == 3 ) {/*some code*/}
if ( i == 4 ) {/*some code*/}
pawn Код:
//as I said the other day
function() //or if ( blah ) << statement
{
//this is the scope here
}
We have a few in Pawn, to start with the basics:
pawn Код:
new
integer,
char,
string[],
bool:boolean,
Float:floating_point;