18.12.2010, 18:53
this is the exempt from the code: public OnPlayerCommandText(playerid, cmdtext[]);
if (strcmp("/open 1", cmdtext, true, 7) == 0)
{
MoveObject(1357.68286133,773.33685303,4,4);
return 1;
}
if (strcmp("/close 1", cmdtext, true, == 0)
{
MoveObject(1357.68286133,773.33685303,12.44526672, 4)
return 1;
}
if(strcmp("/open 2", cmdtext, true, 7) == 0)
{
MoveObject(1357.40942383,713.22784424,4,4);
return 1;
}
if(strcmp("/close 2", cmdtext, true, == 0)
{
MoveObject(1357.40942383,713.22784424,12.44526672, 4);
return 1;
}
return 0;
}
ok now this is the objects:CreateObject(980,1357.68286133,773.3368530 3,12.44526672,0.00000000,0.00000000,90.00000000); //object(airportgate) (2)
CreateObject(980,1357.40942383,713.22784424,12.445 26672,0.00000000,0.00000000,90.00000000); //object(airportgate) (3)
And the errors: C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(115) : warning 217: loose indentation
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(115) : error 029: invalid expression, assumed zero
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(115) : error 017: undefined symbol "playerid"
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(117) : warning 217: loose indentation
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(117) : error 017: undefined symbol "cmdtext"
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(119) : warning 213: tag mismatch
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(119) : warning 202: number of arguments does not match definition
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(123) : error 017: undefined symbol "cmdtext"
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(125) : warning 213: tag mismatch
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(125) : warning 202: number of arguments does not match definition
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(126) : error 001: expected token: ";", but found "return"
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(129) : error 017: undefined symbol "cmdtext"
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(131) : warning 213: tag mismatch
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(131) : warning 202: number of arguments does not match definition
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(135) : error 017: undefined symbol "cmdtext"
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(137) : warning 213: tag mismatch
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(137) : warning 202: number of arguments does not match definition
So does anybody know how to fix it if not what are the commands i need a open and close for each gate...?
if (strcmp("/open 1", cmdtext, true, 7) == 0)
{
MoveObject(1357.68286133,773.33685303,4,4);
return 1;
}
if (strcmp("/close 1", cmdtext, true, == 0)
{
MoveObject(1357.68286133,773.33685303,12.44526672, 4)
return 1;
}
if(strcmp("/open 2", cmdtext, true, 7) == 0)
{
MoveObject(1357.40942383,713.22784424,4,4);
return 1;
}
if(strcmp("/close 2", cmdtext, true, == 0)
{
MoveObject(1357.40942383,713.22784424,12.44526672, 4);
return 1;
}
return 0;
}
ok now this is the objects:CreateObject(980,1357.68286133,773.3368530 3,12.44526672,0.00000000,0.00000000,90.00000000); //object(airportgate) (2)
CreateObject(980,1357.40942383,713.22784424,12.445 26672,0.00000000,0.00000000,90.00000000); //object(airportgate) (3)
And the errors: C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(115) : warning 217: loose indentation
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(115) : error 029: invalid expression, assumed zero
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(115) : error 017: undefined symbol "playerid"
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(117) : warning 217: loose indentation
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(117) : error 017: undefined symbol "cmdtext"
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(119) : warning 213: tag mismatch
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(119) : warning 202: number of arguments does not match definition
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(123) : error 017: undefined symbol "cmdtext"
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(125) : warning 213: tag mismatch
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(125) : warning 202: number of arguments does not match definition
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(126) : error 001: expected token: ";", but found "return"
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(129) : error 017: undefined symbol "cmdtext"
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(131) : warning 213: tag mismatch
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(131) : warning 202: number of arguments does not match definition
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(135) : error 017: undefined symbol "cmdtext"
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(137) : warning 213: tag mismatch
C:\Users\Brad\Documents\Scripts\Airport Gates.pwn(137) : warning 202: number of arguments does not match definition
So does anybody know how to fix it if not what are the commands i need a open and close for each gate...?