[Ajuda] Caixinha 3[ERROS] Porfavor !
#1

pawn Код:
C:\Users\Allisson\Desktop\[GM] Brasil Knight Games\gamemodes\BSC.pwn(49746) : error 029: invalid expression, assumed zero
C:\Users\Allisson\Desktop\[GM] Brasil Knight Games\gamemodes\BSC.pwn(49754) : error 029: invalid expression, assumed zero
C:\Users\Allisson\Desktop\[GM] Brasil Knight Games\gamemodes\BSC.pwn(49757) : error 017: undefined symbol "GivePlayerMoneyEx"
C:\Users\Allisson\Desktop\[GM] Brasil Knight Games\gamemodes\BSC.pwn(50076) : warning 209: function "OnPlayerKeyStateChange" should return a value
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
pawn Код:
if(PlayerInfo[playerid][pCaixinha] == char)
pawn Код:
GivePlayerMoneyEx(playerid, DinheiroCaixinha);
pawn Код:
}
Reply
#2

GivePlayerMoneyEx nгo estб definido globalmente, ou nessa public.
estб faltando return 1; (eu acho) em algum lugar ai.
estб faltando fechar alguma funзгo: ";"
Reply
#3

C:\Users\Allisson\Desktop\[GM] Brasil Knight Games\gamemodes\BSC.pwn(49746) : error 029: invalid expression, assumed zero
C:\Users\Allisson\Desktop\[GM] Brasil Knight Games\gamemodes\BSC.pwn(49754) : error 029: invalid expression, assumed zero

mande essas linhas..

Como o amigo falou acima:
GivePlayerMoneyEx nгo estб definido globalmente, ou nessa public.
estб faltando return 1; na CallBack OnPlayerKeyStateChange.
Reply
#4

pawn Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
    if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        OnPlayerCommandText(playerid,"/sair");
    }
    if((newkeys == KEY_SECONDARY_ATTACK))
    {
        if(PlayerToPoint(1.0,playerid,247.7513,71.8837,1003.6406))
        {
            SetPlayerPos(playerid, 247.7513,71.8837,1003.6406);
            SetPlayerFacingAngle(playerid,2.9147);
            ApplyAnimation(playerid, "HEIST9","Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
            SetTimerEx("LimparAnim", 2000, false, "i", playerid);
            OnPlayerCommandText(playerid,"/pp");
        }
        if(PlayerToPoint(1.0,playerid,245.3939,73.8076,1003.6406))
        {
            SetPlayerPos(playerid, 245.3939,73.8076,1003.6406);
            SetPlayerFacingAngle(playerid,90.6907);
            ApplyAnimation(playerid, "HEIST9","Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
            SetTimerEx("LimparAnim", 2000, false, "i", playerid);
            OnPlayerCommandText(playerid,"/pp1");
        }
        if(PlayerToPoint(1.0,playerid,247.2543,77.1084,1003.6406))
        {
            SetPlayerPos(playerid, 247.2543,77.1084,1003.6406);
            SetPlayerFacingAngle(playerid,276.9771);
            ApplyAnimation(playerid, "HEIST9","Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
            SetTimerEx("LimparAnim", 2000, false, "i", playerid);
            OnPlayerCommandText(playerid,"/pv");
        }
        if(PlayerToPoint(1.0,playerid,248.9982,74.5119,1003.6406))
        {
            SetPlayerPos(playerid, 248.9982,74.5119,1003.6406);
            SetPlayerFacingAngle(playerid,78.9719);
            ApplyAnimation(playerid, "HEIST9","Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
            SetTimerEx("LimparAnim", 2000, false, "i", playerid);
            OnPlayerCommandText(playerid,"/pv");
        }
        if(PlayerToPoint(1.0,playerid,249.7362,64.5239,1003.6406))
        {
            SetPlayerPos(playerid, 249.7362,64.5239,1003.6406);
            SetPlayerFacingAngle(playerid,271.2326);
            ApplyAnimation(playerid, "HEIST9","Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
            SetTimerEx("LimparAnim", 2000, false, "i", playerid);
            OnPlayerCommandText(playerid,"/pr");
        }
        if(PlayerToPoint(1.0,playerid,251.4877,64.6306,1003.6406))
        {
            SetPlayerPos(playerid, 251.4877,64.6306,1003.6406);
            SetPlayerFacingAngle(playerid,97.8139);
            ApplyAnimation(playerid, "HEIST9","Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
            SetTimerEx("LimparAnim", 2000, false, "i", playerid);
            OnPlayerCommandText(playerid,"/pr");
        }
    }
    if(PlayerToPoint(5.0,playerid,1479.1945,-1638.8873,14.1484))
        {
            new DinheiroCaixinha = 1000 + random(400);
            new RespeitoCaixinha = random(2);
            if(PlayerInfo[playerid][pCaixinha] == char)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк pegou uma Caixinha hб pouco tempo, volte novamente apуs o prуximo salбrio!");
                return 1;
            }
            else
            {
                new string[128];
                PlayerInfo[playerid][pCaixinha] = char;
                format(string, sizeof(string), "Player: %s pegou uma Caixinha, com: R$[%d] Respeito[%d], vб б pracinha da Prefeitura e pegue a sua!.",PlayerName(playerid),DinheiroCaixinha, RespeitoCaixinha);
                SendClientMessageToAll(0x9C71A8FF,string);
                GivePlayerMoneyEx(playerid, DinheiroCaixinha);
                PlayerInfo[playerid][pExp] += RespeitoCaixinha;
                SendClientMessage(playerid, 0x8F0000FF, "Vocк jб ganhou uma caixinha de presente,volte novamento apуs o prуximo salбrio!");
                format(string, sizeof(string), "{Na caixinha continha R$[%d] Respeito[%d]!",
                DinheiroCaixinha, RespeitoCaixinha);
                SendClientMessage(playerid, COLOR_RED, string);
            }
        }
Esta ai nessa public e no final dela
Reply
#5

pawn Код:
if(PlayerInfo[playerid][pCaixinha] == char)
pawn Код:
GivePlayerMoneyEx(playerid, DinheiroCaixinha);
Reply
#6

Alguem ?
Reply
#7

if(PlayerInfo[playerid][pCaixinha] == char)

substitui o char por uma condiзгo valida .
Reply
#8

Ta ai parceiro.

PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys) {
    if (
newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
        
OnPlayerCommandText(playerid"/sair");
    }
    if ((
newkeys == KEY_SECONDARY_ATTACK)) {
        if (
PlayerToPoint(1.0playerid247.751371.88371003.6406)) {
            
SetPlayerPos(playerid247.751371.88371003.6406);
            
SetPlayerFacingAngle(playerid2.9147);
            
ApplyAnimation(playerid"HEIST9""Use_SwipeCard"4.000000);
            
SetTimerEx("LimparAnim"2000false"i"playerid);
            
OnPlayerCommandText(playerid"/pp");
        }
        if (
PlayerToPoint(1.0playerid245.393973.80761003.6406)) {
            
SetPlayerPos(playerid245.393973.80761003.6406);
            
SetPlayerFacingAngle(playerid90.6907);
            
ApplyAnimation(playerid"HEIST9""Use_SwipeCard"4.000000);
            
SetTimerEx("LimparAnim"2000false"i"playerid);
            
OnPlayerCommandText(playerid"/pp1");
        }
        if (
PlayerToPoint(1.0playerid247.254377.10841003.6406)) {
            
SetPlayerPos(playerid247.254377.10841003.6406);
            
SetPlayerFacingAngle(playerid276.9771);
            
ApplyAnimation(playerid"HEIST9""Use_SwipeCard"4.000000);
            
SetTimerEx("LimparAnim"2000false"i"playerid);
            
OnPlayerCommandText(playerid"/pv");
        }
        if (
PlayerToPoint(1.0playerid248.998274.51191003.6406)) {
            
SetPlayerPos(playerid248.998274.51191003.6406);
            
SetPlayerFacingAngle(playerid78.9719);
            
ApplyAnimation(playerid"HEIST9""Use_SwipeCard"4.000000);
            
SetTimerEx("LimparAnim"2000false"i"playerid);
            
OnPlayerCommandText(playerid"/pv");
        }
        if (
PlayerToPoint(1.0playerid249.736264.52391003.6406)) {
            
SetPlayerPos(playerid249.736264.52391003.6406);
            
SetPlayerFacingAngle(playerid271.2326);
            
ApplyAnimation(playerid"HEIST9""Use_SwipeCard"4.000000);
            
SetTimerEx("LimparAnim"2000false"i"playerid);
            
OnPlayerCommandText(playerid"/pr");
        }
        if (
PlayerToPoint(1.0playerid251.487764.63061003.6406)) {
            
SetPlayerPos(playerid251.487764.63061003.6406);
            
SetPlayerFacingAngle(playerid97.8139);
            
ApplyAnimation(playerid"HEIST9""Use_SwipeCard"4.000000);
            
SetTimerEx("LimparAnim"2000false"i"playerid);
            
OnPlayerCommandText(playerid"/pr");
        }
    }
    if (
PlayerToPoint(5.0playerid1479.1945, -1638.887314.1484)) {
        new 
DinheiroCaixinha 1000 random(400);
        new 
RespeitoCaixinha random(2);
        if (
PlayerInfo[playerid][pCaixinha] == char) {
            
SendClientMessage(playeridCOLOR_GRAD1"Vocк pegou uma Caixinha hб pouco tempo, volte novamente apуs o prуximo salбrio!");
            return 
1;
        } else {
            new 
string[128];
            
PlayerInfo[playerid][pCaixinha] = char;
            
format(stringsizeof(string), "Player: %s pegou uma Caixinha, com: R$[%d] Respeito[%d], vб б pracinha da Prefeitura e pegue a sua!."PlayerName(playerid), DinheiroCaixinhaRespeitoCaixinha);
            
SendClientMessageToAll(0x9C71A8FFstring);
            
GivePlayerMoneyEx(playeridDinheiroCaixinha);
            
PlayerInfo[playerid][pExp] += RespeitoCaixinha;
            
SendClientMessage(playerid0x8F0000FF"Vocк jб ganhou uma caixinha de presente,volte novamento apуs o prуximo salбrio!");
            
format(stringsizeof(string), "Na caixinha continha R$[%d] Respeito[%d]!"DinheiroCaixinhaRespeitoCaixinha);
            
SendClientMessage(playeridCOLOR_REDstring);
        }
    } 
Substitui essa linha:
Код:
GivePlayerMoneyEx(playerid, DinheiroCaixinha);
Por essa:
Код:
GivePlayerMoney(playerid, DinheiroCaixinha);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)