Jump to content
  • 0

problema comanda /bonus (help)


marius11

Question

Problema intalnita (descriere):Pana acum comanda /bonus mergea acum imi da o eroare si nu stiu ce are
Ero(area / rile) / warning-(ul / urile):

 

E:\Users\ionut\Desktop\Crashed-GM(Old)\gamemodes\gmm.pwn(28441) : error 027: invalid character constant
E:\Users\ionut\Desktop\Crashed-GM(Old)\gamemodes\gmm.pwn(28441) : error 027: invalid character constant
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

linia 28441-SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit bonus 10kk si lvl 3 ! !");


Liniile de cod / sursa / script-ul(obligatoriu):

 

MD:bonus(playerid, params[]){
    {
         if(playerVariables[playerid][pLevel] == 1)
   {
                playerVariables[playerid][pLevel] = 3;

       playerVariables[playerid][pMoney] = 10000000;
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit bonus 10kk si lvl 3 ! !");
            }
            else
            {
            SendClientMessage(playerid, COLOR_GREEN, "{CCCCCC}[BONUS] Ai folosit deja aceasta comanda sau nu ai level 1 !");
            }
        }
        return 1;
    }

 


Imagini / Video (optional):
Ati incercat sa rezolvati singur?:

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 1
CMD:bonus(playerid, params[]){
    {
         if(playerVariables[playerid][pLevel] == 1)
   {
                playerVariables[playerid][pLevel] = 3;

                playerVariables[playerid][pMoney] += 1000000;
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit bonus 10kk si lvl 3 ! !");
            }
            else
            {
            SendClientMessage(playerid, COLOR_GREEN, "{CCCCCC}[BONUS] Ai folosit deja aceasta comanda sau nu ai level 1 !");
            }
        }
        return 1;
    }

Cam asa ar veni.

Ai pus un 0 din greseala,era 100kk.

 

 

Link to comment
Share on other sites

  • 0
Link to comment
Share on other sites

  • 0
La 04.01.2016 at 14:15, WiDuAlK a spus:

bai , uite-te cum se utilizeaza operatorii aici: https://www.sa-mp.ro/forums/topic/17968-notiuni-de-baza/

acolo trebuie sa fie playerVariables[playerid][pMoney] += 10000000;

daca este numai = , de exemplu el are $30000000 , dupa ce va executa /bonus va avea doar 10000000, pentru ca i se modifica suma, nu se adauga bani la cei existent, si pune si GivePlayerMoney.

Mesajul e scris corect, nu pot sa imi dau seama de ce iti da eroare, modifica dupa cum ti-am zis si compileaza

Tot acolo imi da eroare, inainte mergea perfect coamanda , nu stiu ce are de o data :(

Link to comment
Share on other sites

  • 0

uite, incearca asa:

CMD:bonus(playerid, params[])
{
          if(playerVariables[playerid][pLevel] == 1)
 		  {
                playerVariables[playerid][pLevel] += 3;
                playerVariables[playerid][pMoney] += 10000000;
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit bonus 10kk si lvl 3 ! !");
          }
            else return SendClientMessage(playerid, COLOR_GREEN, "{CCCCCC}[BONUS] Ai folosit deja aceasta comanda sau nu ai level 1 !");
    return 0;
}
Edited by Alberto.
  • Upvote 1
Link to comment
Share on other sites

  • 0
Acum 4 ore, Alberto. a spus:

uite, incearca asa:


CMD:bonus(playerid, params[])
{
          if(playerVariables[playerid][pLevel] == 1)
 		  {
                playerVariables[playerid][pLevel] += 3;
                playerVariables[playerid][pMoney] += 10000000;
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit bonus 10kk si lvl 3 ! !");
          }
            else return SendClientMessage(playerid, COLOR_GREEN, "{CCCCCC}[BONUS] Ai folosit deja aceasta comanda sau nu ai level 1 !");
    return 0;
}

a mers ms mult t/c

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.