Jump to content
  • 0

Erroare get gift


Unique

Question

Buna ziua , sunt la inceput la scripting 

Am o erroare : C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(20989) : warning 219: local variable "gString" shadows a variable at a preceding level
C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(20999) : error 017: undefined symbol "pExp"
C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(20990) : warning 204: symbol is assigned a value that is never used: "szMessage"

 

Folosesc GM JustGame si am adaugat comanda get gift , am facut tot ca in tutorial 

Dar intampin probleme la : 

CMD:getgift(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); // Verifica daca-i logat
    if(PlayerInfo[playerid][pGift] == 0) return SendClientMessage(playerid, COLOR_WHITE, "Ai nevoie de minim 1 Gift Point pentru a putea folosi comanda."); // Iii trimite un mesaj daca nu are giftpoints

    new gString[512];
    new szMessage[256];//s-ar putea sa nu ai voie daca nu ai si SCM
    switch(random(2)) // Aici e facut sa iti deie randem din cele 2 case-uri tu poti adauga case 3 case 4 etc.. si pentru fiecare case nou modifici in switch(random(3)) switch(random(4))  sau cate ai.
     {
        case 0:
        {
            new rp = 5;// Aici poti baga sa-i adauge cat rp vrei tu eu am pus 5
            SendClientMessage(playerid, COLOR_WHITE, "Ai castigat 5 Respect Points de la giftbox.");// castiga 5 Respect points
            PlayerInfo[playerid][pGift] -= 1;
            Update(playerid, pGiftx);
            PlayerInfo[playerid][pExp] += rp;
            Update(playerid, pRP);
            GameTextForPlayer(playerid, "~g~5 Respect Points!", 5000, 1);
        }
        case 1:
        {
            new cash = 100000 + random(200000); // Castiga o suma de bani 100.000 $ + random din suma de 200.000 $
            format(gString,sizeof(gString),"* You received $%s.",FormatNumber(cash)); // aici il scrie
            SendClientMessage(playerid, COLOR_SYN, gString);//aici afiseaza mesajul
            PlayerInfo[playerid][pGift] -= 1;
            Update(playerid, pGiftx);
            GivePlayerCash(playerid, cash);
            GameTextForPlayer(playerid, "~g~100.000 - 300.000$!", 5000, 1);
        }

    }
    return 1;

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 1

 

Am o erroare : C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(20989) : warning 219: local variable "gString" shadows a variable at a preceding level
C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(20999) : error 017: undefined symbol "pExp"
C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(20990) : warning 204: symbol is assigned a value that is never used: "szMessage"

 

Prima - ai creat de 2 ori new gString. rand 20999 apasa ctrl + g in pawn editor.

A doua - Ai folosit pExp fara sa il fi definit/creat inainte.

A treia - szMessage nu e folosit nicaieri , e recomandat sa-l stergi.

Link to comment
Share on other sites

  • 1

Nu ai pExp in gamemode, modifica cu ce ai tu in gamemode

11 minutes ago, Unique said:

C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(20990) : warning 219: local variable "gString" shadows a variable at a preceding level
C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(20999) : error 017: undefined symbol "pExp"
C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(21006) : error 035: argument type mismatch (argument 1)
C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(21006) : error 035: argument type mismatch (argument 1)
C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(21007) : error 035: argument type mismatch (argument 3)
C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(20990) : warning 203: symbol is never used: "gString"

acum imi da asta

 

Link to comment
Share on other sites

  • 0

C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(20990) : warning 219: local variable "gString" shadows a variable at a preceding level
C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(20999) : error 017: undefined symbol "pExp"
C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(21006) : error 035: argument type mismatch (argument 1)
C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(21006) : error 035: argument type mismatch (argument 1)
C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(21007) : error 035: argument type mismatch (argument 3)
C:\Users\George\Desktop\JustGame Server\gamemodes\JG.pwn(20990) : warning 203: symbol is never used: "gString"

acum imi da asta

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By InfernoZone
      Primesc Aceasta Eroare  La Compilare!
      include\YSI_Data\y_iterate.inc(108) : fatal error 111: user error: Could not find y_iterate
    • By Bugs
      Salut, am si eu o problema la sistemul de trade de pe gm-ul burned editat de @SkillZ_IT.
      la comanda /trade https://imgur.com/a/J4x55xY ce-l care este pozitionat in partea dreapta nu poate sa apese pe butonul adauga, butonul pregatit functioneaza dar ce-l de adauga nu
      -am incercat sa schimb level m-am uitat prin gm la comenzi am incercat cu alti playeri alte conturi si tot nu merge , inca o problema ar fi ca nu poti sa inchizi acel sistem de trade
      Repet problema o are doar ce-l care e afisat in partea dreapta , persoana care a acceptat trade-ul ce-l care invita poate sa adauge bunuri fara problema
    • By Konti.
      Vreau sa stiu daca a rezolvat cineva problema de la panelul lui @Mister.

      In orice caz, cum rezolv aceasta problema ?

       
       
    • By Funnk
      Ma poate ajuta cineva cu aceste erori/warning-uri?
      E:\pawno\include\mSelection.inc(207) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\mSelection.inc(222) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\mSelection.inc(426) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\mSelection.inc(556) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\fly.inc(45) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\fly.inc(45) : warning 219: local variable "y" shadows a variable at a preceding level
      E:\pawno\include\fly.inc(60) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\fly.inc(60) : warning 219: local variable "y" shadows a variable at a preceding level
      E:\pawno\include\fly.inc(108) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\fly.inc(108) : warning 219: local variable "y" shadows a variable at a preceding level
      E:\pawno\include\OPA.inc(57) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\OPA.inc(58) : warning 219: local variable "y" shadows a variable at a preceding level
      E:\pawno\include\OPA.inc(142) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
      E:\pawno\include\OPA.inc(144) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\OPA.inc(145) : warning 219: local variable "y" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(46) : error 017: undefined symbol "AntiDeAMX"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(2955) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4763) : error 004: function "vUpdate" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4874) : warning 219: local variable "y" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4874) : warning 219: local variable "h" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4893) : warning 219: local variable "y" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4893) : warning 219: local variable "h" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4902) : error 004: function "SS" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4962) : error 004: function "SS" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5013) : error 004: function "ProxDetector" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5166) : error 004: function "SS" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5168) : error 004: function "SS" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5185) : error 004: function "SS" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5344) : error 017: undefined symbol "PutPlayerInVehicleEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5363) : error 017: undefined symbol "PutPlayerInVehicleEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5382) : error 017: undefined symbol "PutPlayerInVehicleEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5401) : error 017: undefined symbol "PutPlayerInVehicleEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5420) : error 017: undefined symbol "PutPlayerInVehicleEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6054) : warning 219: local variable "health" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6056) : error 017: undefined symbol "GetPlayerHealthEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6061) : error 017: undefined symbol "SetPlayerHealthEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6065) : error 017: undefined symbol "SetPlayerHealthEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6494) : error 017: undefined symbol "SetPlayerPosEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6725) : error 004: function "SS" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(7234) : warning 219: local variable "x" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(7234) : warning 219: local variable "y" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(7619) : warning 219: local variable "health" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(7622) : error 017: undefined symbol "GetPlayerHealthEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(7627) : error 017: undefined symbol "Carspeed"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(8360) : error 017: undefined symbol "NumIp"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(8368) : error 017: undefined symbol "AntiFlood_InitPlayer"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(10084) : error 017: undefined symbol "ClearWanted"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(10112) : error 017: undefined symbol "BanCheck"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(10247) : error 004: function "CrimInRange" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(10470) : error 017: undefined symbol "SetPlayerArmourEx"
      Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase

      26 Errors.
      Asa arata comanda inainte sa o modific si dupa ce am moficat-o:
      https://pastebin.com/rDN4eMrn
    • By Funnk
      Salut, am si eu o problema  la comanda /towcar
      Am aceasta comanda in pawno https://pastebin.com/a271BXPZ
      Cand dau compilare imi arata asa https://imgur.com/a/YzJCh
      Ce pot face?
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.