[Ajuda Erro]Portхes Automбticos
#1

Segui um tutorial e obti um erro:
"Pawno compiler library deixou de funcionar"

Linhas adicionadas:

Код:
new gate; //linha 432
Код:
Gate = CreateObject(986, -219.75, 1008.41796875, 20.540370941162, 0, 0, 0);//Portгo fechado , linha 1250
Код:
if(strcmp(cmd, "/abrirportao", true) ==0 ) (
	MoveObject(Gate,-226.48040771484, 1008.466796875, 20.542161941528,1);
	SendClientMessage(playerid, COLOR_YELLOW, "Abris-te o portгo");
	return 1;
	}

   	if(strcmp(cmd, "/fecharportao", true) ==0 ) (
	MoveObject(Gate,-219.75, 1008.41796875, 20.540370941162,1);
	SendClientMessage(playerid, COLOR_YELLOW, "Fechas-te o portгo");
	return 1;
 	}
E quando aperto F5 dб me esse erro e nгo compila a 100%.

Espero obter ajuda, se algum erro уbvio indiquem se faz favor, sou novo nisto...
Reply
#2

pawn Код:
new Gate; //linha 432

public OnFilterScriptInit()
{
    Gate = CreateObject(986, -219.75, 1008.41796875, 20.540370941162, 0, 0, 0);//Portгo fechado , linha 1250
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/abrirportao", cmdtext, true, 10) == 0)
    {
        MoveObject(Gate, -226.48040771484, 1008.466796875, 20.542161941528, 3.0);
        SendClientMessage(playerid, 0xFF00AA, "Abris-te o portгo");
        return 1;
    }
    if (strcmp("/fecharportao", cmdtext, true, 10) == 0)
    {
        MoveObject(Gate, -219.75, 1008.41796875, 20.540370941162, 3.0);
        SendClientMessage(playerid, 0xFF00AA, "Fechas-te o portгo");
        return 1;
    }
    return 0;
}
Vocк errou em:

new gate;

sendo que vocк colocou:

MoveObject(Gate < e seria MoveObject(gate > gate com G minusculo como no new

e abriu a chave do comando com ( sendo que seria { e fecha com }

'-'
Reply
#3

Obrigado.
Agora jб consegui.
Mas, agora deu-me estes erros:

Код:
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(1254) : error 021: symbol already defined: "ShowPlayerMarkers"
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(1266) : error 010: invalid function or declaration
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(1267) : error 010: invalid function or declaration
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(1274) : error 010: invalid function or declaration
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(1286) : error 010: invalid function or declaration
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(1291) : error 021: symbol already defined: "gettime"
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(1293) : error 010: invalid function or declaration
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(1297) : error 021: symbol already defined: "SetTimer"
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(1306) : error 010: invalid function or declaration
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(1783) : warning 217: loose indentation
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(1789) : warning 217: loose indentation
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(1798) : warning 225: unreachable code
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(15390) : warning 219: local variable "tmphour" shadows a variable at a preceding level
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(15391) : warning 219: local variable "tmpminute" shadows a variable at a preceding level
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(15392) : warning 219: local variable "tmpsecond" shadows a variable at a preceding level
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(16867) : warning 203: symbol is never used: "sendcmd"
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(16867) : warning 203: symbol is never used: "tmphour"
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(16867) : warning 203: symbol is never used: "tmpminute"
C:\Users\Andrй\Desktop\samp03bsvr_R2_win32\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(16867) : warning 203: symbol is never used: "tmpsecond"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.
Linhas:
Код:
	ShowPlayerMarkers(0);//1254
if (!strcmp("Yes", GAMEMODE_USE_VERSION, true)) { format(sendcmd, sizeof(sendcmd), "%s - %s", GAMEMODE,VERSION); SetGameModeText(sendcmd); }//1266 (linha)
else { SetGameModeText(GAMEMODE); }//linha 1267
if (strlen(PASSWORD) != 0) { format(sendcmd, sizeof(sendcmd), "password %s", PASSWORD); SendRconCommand(sendcmd); }//linha 1274
	if (realtime)//linha 1286
gettime(tmphour, tmpminute, tmpsecond);//linha 1291
tmphour = shifthour;//linha 1293
SetTimer("UpdateData", 5000, 1);//Updates scores, and syncs time of day //linha 1297
	return 1;//linha 1306
Quanto aos warning me avise se for preciso postar as linhas.
Reply
#4

pawn Код:
#include <time>
Reply
#5

fcosta para lhes avisar, q como na maioria das linguagens de programaзao, pawn tambem й case sensitive, no caso, sao sensiveis a maiusculo e minusculo
Ex:

new Gate nao й igual a new gate
new seilah nao й igual a new SeiLah
new post й igual a new post,

intao й isso q quero te explicar, porfavor preste um pouco mais de atencao
Reply
#6

Sim eu sei.
Mas desculpe jб tava а muitas horas acordado...Nгo prestei atenзгo. Peзo desculpa

EDIT: A include "time" jб estб posta , porйm continua dando os mesmos erros...

Alguйm sabe o que posso fazer? :S
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)