after learn what to do exactly with examples?
#6

Whatever you wish (within reason), it's just a statement. Once you have your statements sussed move onto loops (repeated statements kindof).

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*/}
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.

pawn Код:
//as I said the other day
function() //or if ( blah ) << statement
{
  //this is the scope here
}
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:

pawn Код:
new
  integer,
  char,
  string[],
  bool:boolean,
  Float:floating_point;
Learn how to use them, consult the pdf and Wiki (or ******).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)