Originally Posted by PAWN Compiler Output
\filterscripts\elevator.pwn(94) : warning 217: loose indentation
\filterscripts\elevator.pwn(96) : error 010: invalid function or declaration \filterscripts\elevator.pwn(101) : error 010: invalid function or declaration \filterscripts\elevator.pwn(104) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors. |
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/up", cmdtext, true, 10) == 0)
{
MoveObject(elevator, 2898,-2657.30175781, 45.42610168,0.97);//elevator goes up
SendClientMessage(playerid, 0xFF8000FF, "<Elevator> The elevator is going up!");
}
return 1;
}
if (strcmp("/down", cmdtext, true, 10) == 0)
{
MoveObject(elevator, 2898,-2657.30175781, 6.04528284,0.97);//Elevator goes back down.
SendClientMessage(playerid, 0xFF8000FF, "<Elevator> The elevator is going down!");
}
return 1;
}
return 1;
}
}
Name = CreateObject(objectid, something);
MoveObject(Name, x,y,z,speed); //For speed, I use 3.0
MoveObject(elevator, 2898,-2657.30175781, 45.42610168,0.97);//elevator goes up
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/up", cmdtext, true, 10) == 0)
{
MoveObject(elevator, 2898,-2657.30175781, 45.42610168,0.97);//elevator goes up
SendClientMessage(playerid, 0xFF8000FF, "<Elevator> The elevator is going up!");
return 1;
}
if (strcmp("/down", cmdtext, true, 10) == 0)
{
MoveObject(elevator, 2898,-2657.30175781, 6.04528284,0.97);//Elevator goes back down.
SendClientMessage(playerid, 0xFF8000FF, "<Elevator> The elevator is going down!");
return 1;
}
return 1;
}
new elevator;
public OnGameModeInit()
{
elevator = CreateObject(2898, -2657.20214844,1328.15625000,6.04528284,0.24719238,358.74206543,0.00000000);
}