Здравствуйте. Я написал фильтерскрипт на открывание ворот определенной команды. Но он не компилируется. Вот что выдает:
Код:
C:\Games\GTA-SanAndreas\SERVER\filterscripts\xforce_island.pwn(43) : error 017: undefined symbol "gate1" C:\Games\GTA-SanAndreas\SERVER\filterscripts\xforce_island.pwn(44) : warning 217: loose indentation C:\Games\GTA-SanAndreas\SERVER\filterscripts\xforce_island.pwn(46) : warning 209: function "OnPlayerCommandText" should return a value C:\Games\GTA-SanAndreas\SERVER\filterscripts\xforce_island.pwn(46) : error 010: invalid function or declaration C:\Games\GTA-SanAndreas\SERVER\filterscripts\xforce_island.pwn(49) : error 010: invalid function or declaration C:\Games\GTA-SanAndreas\SERVER\filterscripts\xforce_island.pwn(55) : error 021: symbol already defined: "CreateObject" C:\Games\GTA-SanAndreas\SERVER\filterscripts\xforce_island.pwn(162) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 5 Errors.
Я долго искал ошибки, но так и не исправил. Вот сам скрипт:
Код:
#include <a_samp> #if defined FILTERSCRIPT new gate1; public ongamemodeinit() gate1 = CreateObject(971,-444.580,1442.450,23.795,0.0,0.0,-106.570);//вход public OnFilterScriptInit() { print("--------------------------------------"); print("-------------Loaded-------------------"); print("--------------------------------------"); print("------------By Force------------------"); print("--------------------------------------"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { print("--------------------------------------"); print("--------------Loaded------------------"); print("--------------------------------------"); print("------------By Force------------------"); print("--------------------------------------"); } #endif public OnPlayerConnect(playerid) { SendClientMessage(playerid, 0xFFFF00AA,"Xforce group ADMINS ISLAND activated!"); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) if (strcmp(cmdtext, "/open123", true)==0) { MoveObject (gate1,-444.580,1442.450,23.795,1); return 1; } if (strcmp(cmdtext, "/close123", true)==0) { MoveObject (gate1,-444.580,1442.450,27.795,4); return 1; } { public OnFilterScriptInit() //Обьекты: CreateObject(971,-444.580,1442.450,23.795,0.0,0.0,-106.570); // zabor return 1; }
Заранее спасибо.