public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/lift1d", true)) { MoveObject(uss1, -779.39, 3196.35, 9.69, 15000); }else{ if(!strcmp(cmdtext, "/lift2d", true)) { MoveObject(uss2, -821.67, 3181.70, 9.89, 15000); }else{ if(!strcmp(cmdtext, "/lift1u", true)) { MoveObject(uss1, -779.39, 3196.35, 16.80, 15000); }else{ if(!strcmp(cmdtext, "/lift2u", true)) < This is the line 42 { MoveObject(uss2, -821.67, 3181.70, 17.03, 15000); return 0; } #endif
C:\SA-MP\filterscripts\sacarrier.pwn(48) : error 030: compound statement not closed at the end of file (started at line 42) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/lift1d", true))
{
MoveObject(uss1, -779.39, 3196.35, 9.69, 15000);
}
else
{
if(!strcmp(cmdtext, "/lift2d", true))
{
MoveObject(uss2, -821.67, 3181.70, 9.89, 15000);
}
else
{
if(!strcmp(cmdtext, "/lift1u", true))
{
MoveObject(uss1, -779.39, 3196.35, 16.80, 15000);
}
else
{
if(!strcmp(cmdtext, "/lift2u", true)) < This is the line 42
{
MoveObject(uss2, -821.67, 3181.70, 17.03, 15000);
return 0;
}
I'm sorry, but i don't understood, i'm a newbie in pawn, and i need that ready ASAP
|
public OnPlayerSpawn(playerid)
{ // START OF THE CALLBACK.
// Code between the { and } is executed when a player spawns
} // END OF THE CALLBACK.
if(something)
{
// do something
}
public OnPlayerCommandText(playerid, cmdtext[])
{ // When a player types a command the code from this point will be executed
if(!strcmp(cmdtext, "/lift1d", true)) // If they typed /lift1d
{ // Start of code that will be executed when typing /lift1d
MoveObject(uss1, -779.39, 3196.35, 9.69, 15000); // Move the object
} // End of code that will be executed when typing /lift1d
else if(!strcmp(cmdtext, "/lift2d", true))
{
MoveObject(uss2, -821.67, 3181.70, 9.89, 15000);
}
else if(!strcmp(cmdtext, "/lift1u", true))
{
MoveObject(uss1, -779.39, 3196.35, 16.80, 15000);
}
else if(!strcmp(cmdtext, "/lift2u", true))
{
MoveObject(uss2, -821.67, 3181.70, 17.03, 15000);
}
return 0;
}