Invalid Function
#1

: warning 217: loose indentation // Error line // army = CreateObject(987,-1525.733,482.001,6.203,0.0,0.0,-180.000); //Army Gate

: warning 217: loose indentation // CreateObject(987,-1690.11291504,259.89843750,6.18750000,0.00000000,0 .00000000,0.00000000);

: error 010: invalid function or declaration // if(strcmp(cmdtext, "/sfarmy1", true) == 0)
: error 010: invalid function or declaration // if(strcmp(cmdtext, "/sfarmy", true)== 0)

2 Errors.


Guys help me please, idk how to fix that
Reply
#2

Post the FULL functions perhaps... Also use [ pawn ] [ /pawn ].
About the loose indentation, the problem is that your code isn't placed right ( to left or right ), for example:
pawn Код:
//Wrong
if( !strcmp( cmdtext, "/lol", true ) )
{
  if( !strcmp( cmdtext[ 4 ], "rofl", true ) )
    {
  SendClientMessage( playerid, -1, "Your param is 'rofl'." );
  }
return 1;
}
pawn Код:
//Correct
if( !strcmp( cmdtext, "/lol", true ) )
{
    if( !strcmp( cmdtext[ 4 ], "rofl", true ) )
    {
        SendClientMessage( playerid, -1, "Your param is 'rofl'." );
    }
    return 1;
}
So you must indent your code using the TAB key. 1 tab = 4 spaces.

EDIT:
You can review this tutorial I just wrote.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)