20.01.2011, 18:51
hi,
I'm a beginner (newb) at scripting PAWN and i tried to make a small filterscript for an elevator, I don't want to bother you too much but i'd like that someone helped me out on this one.
The point is, i used a tutorial, copied to my script, replaced the coords and stuff. After compiling it tells me
here's the script:
I know it will probably be a small, stupid mistake i made, but i'd like to know what i did wrong so i won't make this mistake next time!
Thanks
I'm a beginner (newb) at scripting PAWN and i tried to make a small filterscript for an elevator, I don't want to bother you too much but i'd like that someone helped me out on this one.
The point is, i used a tutorial, copied to my script, replaced the coords and stuff. After compiling it tells me
Quote:
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. |
pawn Код:
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;
}
}
Thanks