Jump to content
  • 0

dc compileru imi da erroare ?


Sfinx_17

Question

mi-am creat prima data o noua variabila

new NPCVehicle;

ok si cand mi-am creat codul in OnGameModeInit

NPCVehicle = CreateVehicle(437, 0.0, 0.0, 0.0, 0.0, 0, 0, 1000);

dc imi da eroarea asta cica:

C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(45) : error 017: undefined symbol "NPCVehicle"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

nu am puso la #define sau ce? plz un pic de ajutor aici va rog

Link to comment
Share on other sites

19 answers to this question

Recommended Posts

Laz.. uite am facut cum ai zis dar uite ce primesc la compile acuma:

C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(45) : warning 204: symbol is assigned a value that is never used: "NPCVehicle"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.

plz

Link to comment
Share on other sites

pai trebuie sa o folosesti cumva

new NPCVehicle = CreateVehicle(437, 0.0, 0.0, 0.0, 0.0, 0, 0, 1000);
//===
AddVehicleComponent(NPCVehicle,1010);
//sau
DestroyVehicle(NPCVehicle);

Link to comment
Share on other sites

am incercat:

new NPCVehicle = CreateVehicle(437, 0.0, 0.0, 0.0, 0.0, 0, 0, 1000);

dar tot aceeasi erroare o iau  :-[

C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(249) : error 017: undefined symbol "NPCVehicle"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

codul cu :    new NPCVehicle = CreateVehicle(437, 0.0, 0.0, 0.0, 0.0, 0, 0, 1000); trebuie pusa sus la new asai ? ca acolo am puso

Link to comment
Share on other sites

ffff...

deci:

1.pui new NPCVehicle;

Sus dupa defie sau include

2.pui NPCVehicle = CreateVehicle(437, 0.0, 0.0, 0.0, 0.0, 0, 0, 1000);

in gamemode

3.pui in gamemode,sau intro comanda ceva,dar pentru inceput in OnGameModeInit,dipa CreateVehicle

//===

AddVehicleComponent(NPCVehicle,1010);

//sau

DestroyVehicle(NPCVehicle);


ar trebui sa iti mearga,am testat si eu-credeam ca am uitat si eu - si a mers
Link to comment
Share on other sites

ar trebuii sa mearga dar problema e ca dupa ce am creat variabila new NPCVehicle; atunci cand bag codul la OnGameModeInit asta cu NPCVehicle = CreateVehicle(437, 0.0, 0.0, 0.0, 0.0, 0, 0, 1000); dc iau erroare asta ??

C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(45) : error 017: undefined symbol "NPCVehicle"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Link to comment
Share on other sites

Daca ai pus deja new NPCVehicle; sus in script si NPCVehicle = CreateVehicle in OnGameModeInit, atunci nu trebuie sa-ti dea eroarea aia, iar de warning, se refera la faptul ca nu folosesti variabila definita "NPCVehicle"... daca stii un pic de engleza intelegi ce vrea sa spuna.

-Toate tutorialele postate intra aici sau puneti-le direct [url=http://www.sa-mp.ro/forum/index

Link to comment
Share on other sites

uitati:

deja am sus in script la new codul asta:

new NPCVehicle = CreateVehicle(437, 0.0, 0.0, 0.0, 0.0, 0, 0, 1000);

astai eroarea

C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(249) : error 017: undefined symbol "NPCVehicle"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

dc imi da erroare ca tot nu inteleg plz

Link to comment
Share on other sites

trebuie sa folosesti o variabila globala nu locala (cum faci momentan) - O variabila globala e una valabila pt tot scriptul, pe care o pui sub sub "#include" .

Deci tu trebuie sa ai new NPCVehicle; si dupa in OnGameModeInit sa ai NPCVehicle = CreateVehicle

Apropo, vezi ca e un tutorial despre asta, cauta-l si citeste-l cu atentie.

-Toate tutorialele postate intra aici sau puneti-le direct [url=http://www.sa-mp.ro/forum/index

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Similar Content

    • By VAurel
      Salut, am inceput de la un timp sa cer ajutor prea mult, se pare ca pauza asta mi-a stricat creierul  
      Deci, folosesc gm-ul lui NERS Side-Project, prima versiune, aceea de la care am inceput si eu gm-ul de la "0", am reusit sa adauga mai multe sisteme, etc, si cand am facut banca, mi-am dat seama dupa cateva zile ca la comanda /withdraw pot sa scot cat vreau eu din banca, nu aveam restrictie facuta. Am zis ok, o fac.
      Faza este ca, nu merge, banii sunt stocati printr-o variabila. Folosind un include de BigInt, am incercat o varianta, dar primesc o erroare, nu mai dau de @NERSpe nicaieri, si din cate am inteles, el a editat putin include-ul de BigInt pentru a functiona.
      Link GM : 
      eroare : 
      New-Santos.pwn(1925) : error 033: array must be indexed (variable "GetBigInt")
      Linie Eroare : Comanda intreaga.
      CMD:withdraw(playerid ,params[]) { new amount; if(IsInBank(playerid)) { if(sscanf(params, "d", amount)) return sendUsage(playerid, "/withdraw <Amount of Money>"); if(amount > 999999999) return sendError(playerid, "Nu puteti scoate mai mult de $999.999.999 din banca!"); if(getBank(playerid) > amount) return sendError(playerid, "Nu detineti aceasta suma de bani in banca."); // Linia cu eroarea. removeBank(playerid, amount); giveCash(playerid, amount); SCMf(playerid, COLOR_WHITE, "You have withdrawn ($%s) from bank. New Balance : ($%s).", FormatNumber(amount),FormatBigInt(getBank(playerid))); } else { sendError(playerid, "Nu va aflati intr-o banca!"); } return 1; }  
    • By Liviu Adrian
      Salut, am facut ca in tutorial lui 
       nu am avut nicio eroare, am rezolvat erorile sau warning-urile care erau legat ca uitasem ; sa dau o acolada sau etc. Cand intru pe server din localhost, nu apare nimic, doar sa dau spawn. Mai ziceau unii sa fac update la include, dar nu inteleg ce si cum. Daca ma puteti ajuta pls.
      EDIT: Dupaia cand las sscanf2 in gamemode si la plugins in server.cfg apare asta pe samp-server    
         Error: Function not registered: 'SSCANF_Init'
         Error: Function not registered: 'SSCANF_IsConnected'
         Error: Function not registered: 'SSCANF_Join'
         Error: Function not registered: 'SSCANF_Leave'
      Conexiunea la baza de date gamemode a esuat ---> Server Inchis ~~~
    • By GamerulFOX
      Deci, cand intru in primul checkpoint nu imi apare urmatorul ! Imi apare primul dar cand intru in el dispare si nu apare urmatorul !

      https://imgur.com/a/4lUvC4Z
    • By Max Terror Yt
      cine vrea un host free imi poate da mesaj pe discord Max Terror#2197   
       
    • By Max Terror Yt
      caut un scripter free care sa imi urce un gamemod dicord  Max Terror#2197
  • 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.