12.11.2012, 19:53
Hello I am trying to get this script for my gate to work code is
but pawno gives me errors like
how can I fix this gate?
Код:
#include <a_samp> new Gate, bool:GateClosed = true; public OnFilterScriptInit() { Gate = CreateObject(980, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 100.0); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/Open", true)){ if(GateClosed){ if(IsPlayerInRangeOfPoint(playerid, 15.0, 0.0, 0.0, 0.0)){ GateClosed = false; MoveObject(Gate, 2306.1000976563, 1383.0999755859, 12.39999961853, 3.0, 0.0, 0.0, 0.0); return 1; } } else{ if(IsPlayerInRangeOfPoint(playerid, 15.0, 0.0, 0.0, 0.0)){ GateClosed = true; MoveObject(Gate, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0); return 1; } } } return 0; }
Код:
C:\Users\Rose\Downloads\home.pwn(147) : warning 217: loose indentation C:\Users\Rose\Downloads\home.pwn(149) : error 029: invalid expression, assumed zero C:\Users\Rose\Downloads\home.pwn(150) : error 001: expected token: ";", but found "{" C:\Users\Rose\Downloads\home.pwn(155) : warning 225: unreachable code C:\Users\Rose\Downloads\home.pwn(155) : error 029: invalid expression, assumed zero C:\Users\Rose\Downloads\home.pwn(155) : error 004: function "OnPlayerCommandText" is not implemented C:\Users\Rose\Downloads\home.pwn(157) : error 017: undefined symbol "cmdtext" C:\Users\Rose\Downloads\home.pwn(159) : error 017: undefined symbol "playerid" C:\Users\Rose\Downloads\home.pwn(166) : error 017: undefined symbol "playerid" C:\Users\Rose\Downloads\home.pwn(175) : error 030: compound statement not closed at the end of file (started at line 5) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors.