[Ajuda] Problema -
Felipe_capone - 07.10.2011
Ola no meu gm tem esse codigo de fazer atentado na dp mais ta dando erro alguem me ajuda por favor Codigo :
PHP код:
if(strcmp(cmdtext, "/atentadodp", true) == 0)
{
new string00[128];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string00,sizeof(string00),"%s Fez um atentado terrorista a DP",sendername);
SendClientMessageToAll(0xF60000AA,string00);
GetPlayerPos(playerid,x,y,z);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SetTimerEx("CriarExplosaos",8000,false,"fffdf",x,y,z,10,2000.0);
SetTimerEx("CriarExplosaoss",8000,false,"fffdf",x,y,z,10,2000.0);
GivePlayerGP(playerid, 100);
dinid = CreateDynamicObject(1654,x+1,y,z-0.8,0,0,0);
SetTimerEx("DestruirObjetos",8000,false,"d",dinid);
SendClientMessage(playerid,COLOR_YELLOW,"Vocк armou a bomba e ganhou R$500");
BombTime[playerid] = 1;
SetTimerEx("BombTimer", 240000, false, "i", playerid);
WantedPoints[playerid]+=1;
SetPlayerCriminal(playerid,255,"Atentado terrorista");
else return SendClientMessage(playerid, COLOR_GREY,"Vocк nгo й membro de gang.");
return 1;
}*/
Erro :
Код:
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(1195) : error 020: invalid symbol name ""
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(1205) : error 020: invalid symbol name ""
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(1219) : error 020: invalid symbol name ""
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(3458) : error 029: invalid expression, assumed zero
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(3458) : warning 215: expression has no effect
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(3458) : error 001: expected token: ";", but found "]"
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(3458) : error 029: invalid expression, assumed zero
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(3458) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
7 Errors.
ajuda pf
Re: [Ajuda] Problema -
Josma_cmd - 07.10.2011
pawn Код:
if(strcmp(cmdtext, "/atentadodp", true) == 0)
{
new string00[128];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string00,sizeof(string00),"%s Fez um atentado terrorista a DP",sendername);
SendClientMessageToAll(0xF60000AA,string00);
GetPlayerPos(playerid,x,y,z);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SetTimerEx("CriarExplosaos",8000,false,"fffdf",x,y,z,10,2000.0);
SetTimerEx("CriarExplosaoss",8000,false,"fffdf",x,y,z,10,2000.0);
GivePlayerGP(playerid, 100);
dinid = CreateDynamicObject(1654,x+1,y,z-0.8,0,0,0);
SetTimerEx("DestruirObjetos",8000,false,"d",dinid);
SendClientMessage(playerid,COLOR_YELLOW,"Vocк armou a bomba e ganhou R$500");
BombTime[playerid] = 1;
SetTimerEx("BombTimer", 240000, false, "i", playerid);
WantedPoints[playerid] ++;
SetPlayerCriminal(playerid, 255, "Atentado terrorista");
return 1;
}
Re: [Ajuda] Problema -
Felipe_capone - 07.10.2011
Deu isso
PHP код:
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(1195) : error 020: invalid symbol name ""
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(1205) : error 020: invalid symbol name ""
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(1219) : error 020: invalid symbol name ""
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(3458) : error 029: invalid expression, assumed zero
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(3458) : warning 215: expression has no effect
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(3458) : error 001: expected token: ";", but found "]"
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(3458) : error 029: invalid expression, assumed zero
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(3458) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
7 Errors.
Ta dando a mesma coisa..
Re: [Ajuda] Problema -
Josma_cmd - 07.10.2011
Poderia mandar as linhas 3458, 1219, 1195 e 1205?
Re: [Ajuda] Problema -
Felipe_capone - 07.10.2011
Desculpa Josma foi erro meu ta dando Isso Mesmo com o codigo que vc mandou
PHP код:
C:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51445) : warning 219: local variable "sendername" shadows a variable at a preceding level
C:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51449) : error 017: undefined symbol "x"
C:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51451) : error 017: undefined symbol "x"
C:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51452) : error 017: undefined symbol "x"
C:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51454) : error 017: undefined symbol "dinid"
C:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51454) : error 017: undefined symbol "x"
C:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51455) : error 017: undefined symbol "dinid"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
Re: [Ajuda] Problema -
Josma_cmd - 07.10.2011
pawn Код:
new dinid; //Coloque isto no inicio de seu GM.
new sendername[MAX_PLAYER_NAME]; //Apague isto do seu comando
new Float:x, Float:y, Float:z; //Coloque isto no inicio do comando onde ficava o sendername que vocк acabou de apagar.
Re: [Ajuda] Problema -
Felipe_capone - 07.10.2011
Agora deu isso
PHP код:
C:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51419) : warning 219: local variable "dinid" shadows a variable at a preceding level
C:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51504) : warning 219: local variable "dinid" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 12960 bytes
Code size: 2586956 bytes
Data size: 7077472 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 9693772 bytes
2 Warnings.
Erro da linha 51419 й nesse cod
PHP код:
if(!strcmp(cmd,"/bomba",true))
{
new dinid,Float:x,Float:y,Float:z;
if(BombTime[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк precisa esperar 4 minutos para usar esse comando denovo !");
return 1;
}
if(PlayerInfo[playerid][pMember] == 22)
{
GetPlayerPos(playerid,x,y,z);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SetTimerEx("CriarExplosaos",10000,false,"fffdf",x,y,z,10,2000.0);
SetTimerEx("CriarExplosaoss",10000,false,"fffdf",x,y,z,10,2000.0);
GivePlayerGP(playerid, 500);
dinid = CreateDynamicObject(1654,x+1,y,z-0.8,0,0,0);
SetTimerEx("DestruirObjetos",10000,false,"d",dinid);
SendClientMessage(playerid,COLOR_YELLOW,"Vocк armou a bomba e ganhou R$500 !");
BombTime[playerid] = 1;
SetTimerEx("BombTimer", 22000000, false, "i", playerid);
WantedPoints[playerid]+=1;
SetPlayerCriminal(playerid,255,"Atentado terrorista");
}
else return SendClientMessage(playerid, COLOR_GREY,"Vocк nгo й membro da Al-Qaeda.");
return 1;
}
e o erro 51404 nessse cod :
PHP код:
if(!strcmp(cmd,"/plantarbomba",true))
{
new dinid,Float:x,Float:y,Float:z;
if(ReduceTime[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк precisa esperar 1 minuto para usar esse comando denovo !");
return 1;
}
if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pMember] == 19 || PlayerInfo[playerid][pMember] == 20 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pMember] == 18
|| PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pMember] == 21 || PlayerInfo[playerid][pMember] == 10)
{
if(PlayerToPoint(10, playerid,2144.1770,1626.5814,993.6882))
{
GetPlayerPos(playerid,x,y,z);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SetTimerEx("CriarExplosao",20000,false,"fffdf",x,y,z,10,2000.0);
dinid = CreateDynamicObject(1654,x+1,y-1,z-0.8,0,0,0);
SetTimerEx("DestruirObjeto",20000,false,"d",dinid);
SendClientMessage(playerid,COLOR_YELLOW,"Vocк armou a bomba!Saia de perto rбpido!!");
ReduceTime[playerid] = 1;
SetTimerEx("ReduceTimer", 60000, false, "i", playerid);
SetTimer("PortaoCassino", 140000, 0);
}
else { SendClientMessage(playerid, COLOR_GREY,"Nenhuma porta para abrir neste local."); }
}
else return SendClientMessage(playerid, COLOR_GREY,"Vocк nгo й membro de gang.");
return 1;
}
Erro 51419 :
Код:
new dinid,Float:x,Float:y,Float:z;
Erro 51404 :
Код:
new dinid,Float:x,Float:y,Float:z;
tambem.
Re: [Ajuda] Problema -
Josma_cmd - 07.10.2011
Apaga todos os new dinid e deixa apenas aquele global.
Re: [Ajuda] Problema -
Felipe_capone - 07.10.2011
Mais sу tem aquele mano nao tou axando otro
Re: [Ajuda] Problema -
Josma_cmd - 07.10.2011
Olha ae cara;
new dinid,Float
,Float:y,Float:z;
Nas linhas: 51419 e 51404.
Apaga o dinid, deixa apenas o new dinid; no inicio do GM.