28.12.2013, 10:21
Hello guys, I am trying to create 3 moving gates which have their texture changed, but I am getting these errors:
These are the codes:
Please Help! Thank You!
Код:
C:\Documents and Settings\Attila\My Documents\server\filterscripts\BCFDtest.pwn(40) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\Attila\My Documents\server\filterscripts\BCFDtest.pwn(46) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\Attila\My Documents\server\filterscripts\BCFDtest.pwn(52) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\Attila\My Documents\server\filterscripts\BCFDtest.pwn(58) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\Attila\My Documents\server\filterscripts\BCFDtest.pwn(63) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\Attila\My Documents\server\filterscripts\BCFDtest.pwn(69) : error 035: argument type mismatch (argument 1) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.
Код:
#define FILTERSCRIPT #include <a_samp> #define COLOR_RED 0xff0000FF new test[MAX_PLAYERS]; new test2[MAX_PLAYERS]; new test3[MAX_PLAYERS]; new Gate1[MAX_PLAYERS]; new Gate2[MAX_PLAYERS]; new Gate3[MAX_PLAYERS]; public OnPlayerConnect(playerid) { test[playerid] = CreatePlayerObject(playerid, 19447, 684.89984, 1851.06824, 10.28801, 0.00000, 0.00000, 80.58001); SetPlayerObjectMaterial(playerid, test[playerid], 0, 11008, "firehouse_sfse", "GB_sandstwall01", 0); test2[playerid] = CreatePlayerObject(playerid, 19447, 694.28796, 1849.49451, 10.28801, 0.00000, 0.00000, 80.58001); SetPlayerObjectMaterial(playerid, test2[playerid], 0, 11008, "firehouse_sfse", "GB_sandstwall01", 0); test3[playerid] = CreatePlayerObject(playerid, 3268, 687.80273, 1840.56958, 4.83697, 0.00000, 0.00000, -99.36002); SetPlayerObjectMaterial(playerid, test3[playerid], 1, 11008, "firehouse_sfse", "GB_sandstwall01", 0); Gate1[playerid] = CreatePlayerObject(playerid, 17951, 683.15887, 1851.42261, 6.76438, 0.00000, 0.00000, 80.12000); SetPlayerObjectMaterial(playerid, Gate1[playerid], 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0); Gate2[playerid] = CreatePlayerObject(playerid, 17951, 689.87085, 1850.30139, 6.76438, 0.00000, 0.00000, 80.12000); SetPlayerObjectMaterial(playerid, Gate2[playerid], 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0); Gate3[playerid] = CreatePlayerObject(playerid, 17951, 696.49762, 1849.19312, 6.76426, 0.00000, 0.00000, 80.12000); SetPlayerObjectMaterial(playerid, Gate3[playerid], 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/bay1o", true) == 0) { SendClientMessage(playerid, COLOR_RED,"Bay 1 is open"); //On every line this is the error MoveObject(Gate1, 683.15887, 1851.42261, 10.30182, 1); } if(strcmp(cmdtext, "/bay1c", true) == 0) { SendClientMessage(playerid, COLOR_RED,"Bay 1 is closed"); MoveObject(Gate1, 683.15887, 1851.42261, 6.76438, 1); } if(strcmp(cmdtext, "/bay1o", true) == 0) { SendClientMessage(playerid, COLOR_RED,"Bay 2 is open"); MoveObject(Gate2, 689.87085, 1850.30139, 10.29825, 1); return 1; } if(strcmp(cmdtext, "/bay1c", true) == 0) { SendClientMessage(playerid, COLOR_RED,"Bay 2 is closed"); MoveObject(Gate2, 689.87085, 1850.30139, 6.76438, 1); if(strcmp(cmdtext, "/bay1o", true) == 0) { SendClientMessage(playerid, COLOR_RED,"Bay 3 is open"); MoveObject(Gate3, 696.49762, 1849.19312, 10.28726, 1); return 1; } if(strcmp(cmdtext, "/bay1c", true) == 0) { SendClientMessage(playerid, COLOR_RED,"Bay 3 is closed"); MoveObject(Gate3, 696.49762, 1849.19312, 6.76426, 1); return 1; } return 0; }