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