if(strcmp("/capture", cmdtext, true, 10) == 0) { if(InDm[playerid] >= 1) return SendClientMessage(playerid,0xFF0000FF,"ERROR:You can't use this command in a dm/event."); if(PlayerInfo[playerid][gangid] == 0) return SendClientMessage(playerid,COLORE_ROSSO,"ERROR:You are not in any gang."); if(IsPlayerInRangeOfPoint(playerid, 10.0, 1975.5731, -1249.5286, 20.383)//gang 1 if(Count <= 19) return SendClientMessage(playerid, COLORE_ROSSO, "ERROR:This gang is already under capture."); { Count = 20; if(PlayerInfo[playerid][gangid] == 1)GangZoneFlashForAll(gang1, 0xFFFFFF96); if(PlayerInfo[playerid][gangid] == 1)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); if(PlayerInfo[playerid][gangid] == 2)GangZoneFlashForAll(gang1, 0x80000096); if(PlayerInfo[playerid][gangid] == 2)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); KillTimer(MyTimer[playerid]); MyTimer[playerid] = SetTimerEx("TestFunction", 1000, 1, "i", playerid); return 1; { if(IsPlayerInRangeOfPoint(playerid, 10.0, 1104.9656, 992.6399, 30.7290))//gang 2 if(Counta <= 19) return SendClientMessage(playerid, COLORE_ROSSO, "ERROR:This gang is already under capture."); } Counta = 20; if(PlayerInfo[playerid][gangid] == 1)GangZoneFlashForAll(gang2, 0xFFFFFF96); if(PlayerInfo[playerid][gangid] == 1)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); if(PlayerInfo[playerid][gangid] == 2)GangZoneFlashForAll(gang2, 0x80000096); if(PlayerInfo[playerid][gangid] == 2)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); KillTimer(MyTimera[playerid]); MyTimera[playerid] = SetTimerEx("TestFunctiona", 1000, 1, "i", playerid); } return 1; }
if(strcmp("/capture", cmdtext, true, 10) == 0) { if(InDm[playerid] >= 1) return SendClientMessage(playerid,0xFF0000FF,"ERROR:You can't use this command in a dm/event."); if(PlayerInfo[playerid][gangid] == 0) return SendClientMessage(playerid,COLORE_ROSSO,"ERROR:You are not in any gang."); if(IsPlayerInRangeOfPoint(playerid, 10.0, 1975.5731, -1249.5286, 20.383)//gang 1 { if(Count <= 19) return SendClientMessage(playerid, COLORE_ROSSO, "ERROR:This gang is already under capture."); Count = 20; if(PlayerInfo[playerid][gangid] == 1)GangZoneFlashForAll(gang1, 0xFFFFFF96); if(PlayerInfo[playerid][gangid] == 1)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); if(PlayerInfo[playerid][gangid] == 2)GangZoneFlashForAll(gang1, 0x80000096); if(PlayerInfo[playerid][gangid] == 2)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); KillTimer(MyTimer[playerid]); MyTimer[playerid] = SetTimerEx("TestFunction", 1000, 1, "i", playerid); } if(IsPlayerInRangeOfPoint(playerid, 10.0, 1104.9656, 992.6399, 30.7290))//gang 2 { if(Counta <= 19) return SendClientMessage(playerid, COLORE_ROSSO, "ERROR:This gang is already under capture."); Counta = 20; if(PlayerInfo[playerid][gangid] == 1)GangZoneFlashForAll(gang2, 0xFFFFFF96); if(PlayerInfo[playerid][gangid] == 1)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); if(PlayerInfo[playerid][gangid] == 2)GangZoneFlashForAll(gang2, 0x80000096); if(PlayerInfo[playerid][gangid] == 2)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); KillTimer(MyTimera[playerid]); MyTimera[playerid] = SetTimerEx("TestFunctiona", 1000, 1, "i", playerid); } return 1; }
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1975.5731, -1249.5286, 20.383)//gang 1
if(Count <= 19) return SendClientMessage(playerid, COLORE_ROSSO, "ERROR:This gang is already under capture."); {
Try this code, missing brackets.
Код:
if(strcmp("/capture", cmdtext, true, 10) == 0) { if(InDm[playerid] >= 1) return SendClientMessage(playerid,0xFF0000FF,"ERROR:You can't use this command in a dm/event."); if(PlayerInfo[playerid][gangid] == 0) return SendClientMessage(playerid,COLORE_ROSSO,"ERROR:You are not in any gang."); if(IsPlayerInRangeOfPoint(playerid, 10.0, 1975.5731, -1249.5286, 20.383)//gang 1 { if(Count <= 19) return SendClientMessage(playerid, COLORE_ROSSO, "ERROR:This gang is already under capture."); Count = 20; if(PlayerInfo[playerid][gangid] == 1)GangZoneFlashForAll(gang1, 0xFFFFFF96); if(PlayerInfo[playerid][gangid] == 1)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); if(PlayerInfo[playerid][gangid] == 2)GangZoneFlashForAll(gang1, 0x80000096); if(PlayerInfo[playerid][gangid] == 2)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); KillTimer(MyTimer[playerid]); MyTimer[playerid] = SetTimerEx("TestFunction", 1000, 1, "i", playerid); } if(IsPlayerInRangeOfPoint(playerid, 10.0, 1104.9656, 992.6399, 30.7290))//gang 2 { if(Counta <= 19) return SendClientMessage(playerid, COLORE_ROSSO, "ERROR:This gang is already under capture."); Counta = 20; if(PlayerInfo[playerid][gangid] == 1)GangZoneFlashForAll(gang2, 0xFFFFFF96); if(PlayerInfo[playerid][gangid] == 1)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); if(PlayerInfo[playerid][gangid] == 2)GangZoneFlashForAll(gang2, 0x80000096); if(PlayerInfo[playerid][gangid] == 2)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); KillTimer(MyTimera[playerid]); MyTimera[playerid] = SetTimerEx("TestFunctiona", 1000, 1, "i", playerid); } return 1; } Код:
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1975.5731, -1249.5286, 20.383)//gang 1 |
C:\Users\DAVIDE\Desktop\ise\gamemodes\dm.pwn(5524) : warning 217: loose indentation
C:\Users\DAVIDE\Desktop\ise\gamemodes\dm.pwn(5529) : error 001: expected token: ")", but found "{" C:\Users\DAVIDE\Desktop\ise\gamemodes\dm.pwn(5552) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
if(strcmp("/capture", cmdtext, true, 10) == 0) { if(InDm[playerid] >= 1) return SendClientMessage(playerid,0xFF0000FF,"ERROR:You can't use this command in a dm/event."); if(PlayerInfo[playerid][gangid] == 0) return SendClientMessage(playerid,COLORE_ROSSO,"ERROR:You are not in any gang."); if(IsPlayerInRangeOfPoint(playerid, 10.0, 1975.5731, -1249.5286, 20.383))//gang 1 { if(Count <= 19) return SendClientMessage(playerid, COLORE_ROSSO, "ERROR:This gang is already under capture."); Count = 20; if(PlayerInfo[playerid][gangid] == 1)GangZoneFlashForAll(gang1, 0xFFFFFF96); if(PlayerInfo[playerid][gangid] == 1)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); if(PlayerInfo[playerid][gangid] == 2)GangZoneFlashForAll(gang1, 0x80000096); if(PlayerInfo[playerid][gangid] == 2)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); KillTimer(MyTimer[playerid]); MyTimer[playerid] = SetTimerEx("TestFunction", 1000, 1, "i", playerid); } if(IsPlayerInRangeOfPoint(playerid, 10.0, 1104.9656, 992.6399, 30.7290))//gang 2 { if(Counta <= 19) return SendClientMessage(playerid, COLORE_ROSSO, "ERROR:This gang is already under capture."); Counta = 20; if(PlayerInfo[playerid][gangid] == 1)GangZoneFlashForAll(gang2, 0xFFFFFF96); if(PlayerInfo[playerid][gangid] == 1)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); if(PlayerInfo[playerid][gangid] == 2)GangZoneFlashForAll(gang2, 0x80000096); if(PlayerInfo[playerid][gangid] == 2)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); KillTimer(MyTimera[playerid]); MyTimera[playerid] = SetTimerEx("TestFunctiona", 1000, 1, "i", playerid); } return 1; }
Fixed ")" with better indentation.
Код:
if(strcmp("/capture", cmdtext, true, 10) == 0) { if(InDm[playerid] >= 1) return SendClientMessage(playerid,0xFF0000FF,"ERROR:You can't use this command in a dm/event."); if(PlayerInfo[playerid][gangid] == 0) return SendClientMessage(playerid,COLORE_ROSSO,"ERROR:You are not in any gang."); if(IsPlayerInRangeOfPoint(playerid, 10.0, 1975.5731, -1249.5286, 20.383))//gang 1 { if(Count <= 19) return SendClientMessage(playerid, COLORE_ROSSO, "ERROR:This gang is already under capture."); Count = 20; if(PlayerInfo[playerid][gangid] == 1)GangZoneFlashForAll(gang1, 0xFFFFFF96); if(PlayerInfo[playerid][gangid] == 1)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); if(PlayerInfo[playerid][gangid] == 2)GangZoneFlashForAll(gang1, 0x80000096); if(PlayerInfo[playerid][gangid] == 2)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); KillTimer(MyTimer[playerid]); MyTimer[playerid] = SetTimerEx("TestFunction", 1000, 1, "i", playerid); } if(IsPlayerInRangeOfPoint(playerid, 10.0, 1104.9656, 992.6399, 30.7290))//gang 2 { if(Counta <= 19) return SendClientMessage(playerid, COLORE_ROSSO, "ERROR:This gang is already under capture."); Counta = 20; if(PlayerInfo[playerid][gangid] == 1)GangZoneFlashForAll(gang2, 0xFFFFFF96); if(PlayerInfo[playerid][gangid] == 1)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); if(PlayerInfo[playerid][gangid] == 2)GangZoneFlashForAll(gang2, 0x80000096); if(PlayerInfo[playerid][gangid] == 2)SendClientMessage(playerid, COLORE_VERDE, "INFO:Capture started wait 20 seconds for capture this territory."); KillTimer(MyTimera[playerid]); MyTimera[playerid] = SetTimerEx("TestFunctiona", 1000, 1, "i", playerid); } return 1; } |