Ajuda por favor erro - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: Ajuda por favor erro (
/showthread.php?tid=343589)
Ajuda por favor erro -
yuran-kun - 18.05.2012
Alguem por favor poderia me dizer qual o erro nessa parte?
Код:
#include <a_sampdb>
new PortaoBaseinterno
PortaoBaseinterno = CreateObject(971,1588.8000488281,-1638.0999755859,15.30023211,0.0000,0.0000,0.0000);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/abrirpi", true) == 0)
{
MoveObject(PortaoBaseinterno,1588.8000488281, -1638.0999755859, 8.8000001907349, 3.0);
SendClientMessage(playerid, 0x9E3EFFAA, "[INFO] Abrindo PORTAO interno da PM...");
return 1;
}
if(strcmp(cmdtext, "/fecharpi", true) == 0)
{
MoveObject(PortaoBaseinterno,1588.800048828, -1638.0999755859, 15.30023211, 3.0);
SendClientMessage(playerid, 0x9E3EFFAA, "[INFO] Fechando PORTAO interno da PM...");
return 1;
}
}
Aqui estгo os erros que estгo dando
Код:
C:\Users\Akatsuk\Desktop\Yuran\Programas\samp03dsvr_R2_win32\gamemodes\Modelo1.pwn(151) : warning 217: loose indentation
C:\Users\Akatsuk\Desktop\Yuran\Programas\samp03dsvr_R2_win32\gamemodes\Modelo1.pwn(152) : warning 217: loose indentation
C:\Users\Akatsuk\Desktop\Yuran\Programas\samp03dsvr_R2_win32\gamemodes\Modelo1.pwn(234) : warning 209: function "OnPlayerCommandText" should return a value
C:\Users\Akatsuk\Desktop\Yuran\Programas\samp03dsvr_R2_win32\gamemodes\Modelo1.pwn(239) : error 021: symbol already defined: "PortaoBaseinterno"
C:\Users\Akatsuk\Desktop\Yuran\Programas\samp03dsvr_R2_win32\gamemodes\Modelo1.pwn(245) : error 021: symbol already defined: "OnPlayerCommandText"
C:\Users\Akatsuk\Desktop\Yuran\Programas\samp03dsvr_R2_win32\gamemodes\Modelo1.pwn(259) : warning 209: function "OnPlayerCommandText" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: Ajuda por favor erro -
WagnerPM - 18.05.2012
Jб existe a callback OnPlayerCommandText
Apague isto:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/abrirpi", true) == 0)
{
MoveObject(PortaoBaseinterno,1588.8000488281, -1638.0999755859, 8.8000001907349, 3.0);
SendClientMessage(playerid, 0x9E3EFFAA, "[INFO] Abrindo PORTAO interno da PM...");
return 1;
}
if(strcmp(cmdtext, "/fecharpi", true) == 0)
{
MoveObject(PortaoBaseinterno,1588.800048828, -1638.0999755859, 15.30023211, 3.0);
SendClientMessage(playerid, 0x9E3EFFAA, "[INFO] Fechando PORTAO interno da PM...");
return 1;
}
return 1;
}
E coloque isso:
pawn Код:
if(strcmp(cmdtext, "/abrirpi", true) == 0)
{
MoveObject(PortaoBaseinterno,1588.8000488281, -1638.0999755859, 8.8000001907349, 3.0);
SendClientMessage(playerid, 0x9E3EFFAA, "[INFO] Abrindo PORTAO interno da PM...");
return 1;
}
if(strcmp(cmdtext, "/fecharpi", true) == 0)
{
MoveObject(PortaoBaseinterno,1588.800048828, -1638.0999755859, 15.30023211, 3.0);
SendClientMessage(playerid, 0x9E3EFFAA, "[INFO] Fechando PORTAO interno da PM...");
return 1;
}
Dentro da
public OnPlayerCommandText