07.06.2013, 13:17
I made a gate system and it have error..
My cmds:
i already used: #include <a_samp> #include <zcmd>
But my errors:
But i don't have class/group i wanted that any body can open it with a pass like /o12 to open/close
My cmds:
Код:
command(gate, playerid, params[]) { if(GateOpen == 0) { MoveObject(Gate, 1706.05115, 1607.58203, 5.82474); GateOpen = 1; } else { MoveObject(Gate, 1706.05115, 1607.58203, 11.89231); GateOpen = 0; } return 1; } command(gate, playerid, params[]) { if(Player[playerid][Group] == ( 0)) { if(GateOpen == 0) { MoveObject(Gate, 1706.05115, 1607.58203, 5.82474); GateOpen = 1; } else { MoveObject(Gate, 1706.05115, 1607.58203, 11.89231); GateOpen = 0; } } else { SendClientMessage(playerid, color, "Command unavailable."); } return 1; } command(gate, playerid, params[]) { if(IsPlayerInRangeOfPoint(playerid, 5.0(range),1701.1674,1609.4799,10.4585,251.6833 )) { if(Player[playerid][Group] == (0)) if(GateOpen == 0) { MoveObject(Gate, 1706.05115, 1607.58203, 5.82474); GateOpen = 1; } else { MoveObject(Gate, 1706.05115, 1607.58203, 11.89231); GateOpen = 0; } } else { SendClientMessage(playerid, color, "Command unavailable."); } } else { SendClientMessage(playerid, color, "You are not in range of the gate."); } return 1; }
But my errors:
Код:
D:\WORLD ATTACK\gamemodes\Test.pwn(589) : warning 202: number of arguments does not match definition D:\WORLD ATTACK\gamemodes\Test.pwn(594) : warning 202: number of arguments does not match definition D:\WORLD ATTACK\gamemodes\Test.pwn(600) : error 021: symbol already defined: "cmd_gate" D:\WORLD ATTACK\gamemodes\Test.pwn(601) : error 017: undefined symbol "Player" D:\WORLD ATTACK\gamemodes\Test.pwn(601) : warning 215: expression has no effect D:\WORLD ATTACK\gamemodes\Test.pwn(601) : error 001: expected token: ";", but found "]" D:\WORLD ATTACK\gamemodes\Test.pwn(601) : error 029: invalid expression, assumed zero D:\WORLD ATTACK\gamemodes\Test.pwn(601) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.