[Ajuda] Problema
#1

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(playeridsendernamesizeof(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.000000);
            
SetTimerEx("CriarExplosaos",8000,false,"fffdf",x,y,z,10,2000.0);
            
SetTimerEx("CriarExplosaoss",8000,false,"fffdf",x,y,z,10,2000.0);
            
GivePlayerGP(playerid100);
            
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"240000false"i"playerid);
            
WantedPoints[playerid]+=1;
            
SetPlayerCriminal(playerid,255,"Atentado terrorista");
    else return 
SendClientMessage(playeridCOLOR_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
Reply
#2

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;
    }
Reply
#3

Deu isso
PHP код:
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(1195) : error 020invalid symbol name ""
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(1205) : error 020invalid symbol name ""
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(1219) : error 020invalid symbol name ""
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(3458) : error 029invalid expressionassumed zero
C
:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(3458) : warning 215expression has no effect
C
:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(3458) : error 001expected token";"but found "]"
C:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(3458) : error 029invalid expressionassumed zero
C
:\Users\Felipe\Desktop\gmusado\gamemodes\Testemapa.pwn(3458) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
7 Errors

Ta dando a mesma coisa..
Reply
#4

Poderia mandar as linhas 3458, 1219, 1195 e 1205?
Reply
#5

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 219local variable "sendername" shadows a variable at a preceding level
C
:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51449) : error 017undefined symbol "x"
C:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51451) : error 017undefined symbol "x"
C:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51452) : error 017undefined symbol "x"
C:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51454) : error 017undefined symbol "dinid"
C:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51454) : error 017undefined symbol "x"
C:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51455) : error 017undefined symbol "dinid"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


6 Errors

Reply
#6

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.
Reply
#7

Agora deu isso
PHP код:
C:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51419) : warning 219local variable "dinid" shadows a variable at a preceding level
C
:\Users\Felipe\Desktop\gmusado\gamemodes\Elite.pwn(51504) : warning 219local variable "dinid" shadows a variable at a preceding level
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase

Header size
:          12960 bytes
Code size
:          2586956 bytes
Data size
:          7077472 bytes
Stack
/heap size:      16384 bytesestimated maxusageunknowndue 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(playeridCOLOR_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.000000);
            
SetTimerEx("CriarExplosaos",10000,false,"fffdf",x,y,z,10,2000.0);
            
SetTimerEx("CriarExplosaoss",10000,false,"fffdf",x,y,z,10,2000.0);
            
GivePlayerGP(playerid500);
            
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"22000000false"i"playerid);
            
WantedPoints[playerid]+=1;
            
SetPlayerCriminal(playerid,255,"Atentado terrorista");
    }
    else return 
SendClientMessage(playeridCOLOR_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(playeridCOLOR_GREY"  Vocк precisa esperar 1 minuto para usar esse comando denovo !");
                   return 
1;
    }
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == || 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(10playerid,2144.1770,1626.5814,993.6882))
        {
            
GetPlayerPos(playerid,x,y,z);
            
ApplyAnimation(playerid"BOMBER""BOM_Plant"4.000000);
            
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"60000false"i"playerid);
            
SetTimer("PortaoCassino"1400000);
           }
        else { 
SendClientMessage(playeridCOLOR_GREY,"Nenhuma porta para abrir neste local."); }
    }
    else return 
SendClientMessage(playeridCOLOR_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.
Reply
#8

Apaga todos os new dinid e deixa apenas aquele global.
Reply
#9

Mais sу tem aquele mano nao tou axando otro
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)