[ajuda] 1 erro - array13 - 02.09.2011
Boas pessoal,eu estou tendo problemas com este erro
PHP код:
C:\Documents and Settings\kikito.KIKITO-PC\Ambiente de trabalho\tb\tb.pwn(124) : error: 030: compound statement not closed at the end of file (started at line 84)
o comando que estб a dar erro й:
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/abrirportao", cmdtext, true, 10) == 0)
{
new name[24];
GetPlayerName(playerid, name, sizeof(name));
if(strcmp("[TB]", name, true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(21, 2375.0532, -2646.1162, 12.6900, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
else if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(12, 2424.7588, -2416.4624, 12.2100, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
else if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(57, 2376.3201, -2165.0100, 29.0662, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
return 1;
}
else if (strcmp("/fecharportao", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(21, 2375.20, -2657.95, 12.69, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora fechado :D.");
}
else if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(12, 2416.79, -2424.33, 12.2, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora fechado :D.");
}
else if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(57, 2376.32, -2165.01, 21.01, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo estб agora fechado :D.");
}
return 1;
}
^^Filterscript
Re: [ajuda] 1 erro -
[R] ousenber [K] - 02.09.2011
qual a linha 84?
e porque aqui: MoveObject(21 << aqui , 2375.0532, -2646.1162, 12.6900, 2.0); , ta como numero? tinha q esta alguma outra coisa nгo?
tipo:
PHP код:
Topo
new PortaoNoob;
OnGameModeInit:
PortaoNoob = CreateObject...
Comando:
MoveObject(PortaoNoob ...
Re: [ajuda] 1 erro -
Shadoww5 - 02.09.2011
Caso ele saiba o ID do objeto, nгo й preciso criar nenhuma variavel para isto.
Re: [ajuda] 1 erro - array13 - 02.09.2011
os numeros estao certos, eu ja tive como gate1 ; gate2; gate3 mas trokei a pensar que foxe disso.
Mas alguem me ajuda?
Re: [ajuda] 1 erro -
JonathanFeitosa - 02.09.2011
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/abrirportao", cmdtext, true, 10) == 0)
{
new name[24];
GetPlayerName(playerid, name, sizeof(name));
if(strcmp("[TB]", name, true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(21, 2375.0532, -2646.1162, 12.6900, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(12, 2424.7588, -2416.4624, 12.2100, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(57, 2376.3201, -2165.0100, 29.0662, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
}
return true;
}
if (strcmp("/fecharportao", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(21, 2375.20, -2657.95, 12.69, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora fechado :D.");
}
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(12, 2416.79, -2424.33, 12.2, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora fechado :D.");
}
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(57, 2376.32, -2165.01, 21.01, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo estб agora fechado :D.");
}
return true;
}
// ...........
Re: [ajuda] 1 erro - array13 - 02.09.2011
mesmo erro...
Aqui estб o filterscript:
http://pastebin.com/vSfEget6
Re: [ajuda] 1 erro -
JonathanFeitosa - 02.09.2011
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/abrirportao", cmdtext, true, 10) == 0)
{
new name[24];
GetPlayerName(playerid, name, sizeof(name));
if(strcmp("[TB]", name, true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(21, 2375.0532, -2646.1162, 12.6900, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(12, 2424.7588, -2416.4624, 12.2100, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(57, 2376.3201, -2165.0100, 29.0662, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
}
return true;
}
if (strcmp("/fecharportao", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(21, 2375.20, -2657.95, 12.69, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora fechado :D.");
}
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(12, 2416.79, -2424.33, 12.2, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora fechado :D.");
}
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(57, 2376.32, -2165.01, 21.01, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo estб agora fechado :D.");
}
return true;
}
return false;
}
Re: [ajuda] 1 erro - array13 - 02.09.2011
^^trabalho,valeu ai..
+rep para ti
Re: [ajuda] 1 erro - array13 - 02.09.2011
agora so ha 2 problemas...
primeiro,o comando so trabalha no 1 portao
seundo, quando meto /abrirportao abre todos xD
problemas resolvidos,estava a por o if(IsPlayerInRangeOfPoint) todos iguais xD
Re: [ajuda] 1 erro -
Cristhian - 03.09.2011
Tente:
pawn Код:
//topo do FS
new portao;
new portao2;
new portao3;
//na public commandtext
{
if (strcmp("/abrirportao", cmdtext, true, 10) == 0)
{
new name[24];
GetPlayerName(playerid, name, sizeof(name));
if(strcmp("[TB]", name, true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
portao = MoveObject(21, 2375.0532, -2646.1162, 12.6900, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
else if (strcmp("abrirportao2", cmdtext, true, 10) == 0)
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
portao2 = MoveObject(12, 2424.7588, -2416.4624, 12.2100, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
else if (strcmp("abrirportao3", cmdtext, true, 10) == 0)
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
portao3 = MoveObject(57, 2376.3201, -2165.0100, 29.0662, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
}
return true;
}
if (strcmp("/fecharportao", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
portao = MoveObject(21, 2375.20, -2657.95, 12.69, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora fechado :D.");
}
else if (strcmp("/fecharportao2", cmdtext, true, 10) == 0)
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
portao2 = MoveObject(12, 2416.79, -2424.33, 12.2, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora fechado :D.");
}
else if (strcmp("/fecharportao3", cmdtext, true, 10) == 0)
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(57, 2376.32, -2165.01, 21.01, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo estб agora fechado :D.");
}
return true;
}
return false;
}