Help pls. i fkd up all my WORK
#1

Hello i was working on something,and then when i compiled it it showed 24 errors,all something undefined,but they were defined. After i defined one again there weren't 24 errors anymore but there were 4 errors.So here they are.



Quote:

C:\Users\Janko i Boba\Desktop\BWRP.pwn(12746) : warning 219: local variable "VoziloJeAvion" shadows a variable at a preceding level
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12746) : warning 219: local variable "VoziloJeBrod" shadows a variable at a preceding level
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12746) : warning 219: local variable "VoziloJeKamion" shadows a variable at a preceding level
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12746) : warning 219: local variable "VoziloJeMotor" shadows a variable at a preceding level
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12746) : warning 219: local variable "VoziloJeBicikla" shadows a variable at a preceding level
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12746) : warning 219: local variable "DostavljacVozila" shadows a variable at a preceding level
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12749) : error 012: invalid function call, not a valid address
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12749) : error 001: expected token: ";", but found ")"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12749) : error 029: invalid expression, assumed zero
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12749) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


And here goes the script with errors:

Quote:

/////////////////////////////////////////////////
new VoziloJeAvion,VoziloJeBrod,VoziloJeKamion,VoziloJe Motor,VoziloJeBicikla,DostavljacVozila;
for(new o; o < MAX_VOZILA; o++)
{
if(VoziloJeAvion(GetVehicleModel(o)) || VoziloJeBrod(GetVehicleModel(o)) || VoziloJeKamion(GetVehicleModel(o))) Fuel[o] = 80;
else if(VoziloJeMotor(GetVehicleModel(o))) Fuel[o] = 45;
else if(VoziloJeBicikla(GetVehicleModel(o)) || GetVehicleModel(o) == 53 Fuel[o] = 1000000;
else Fuel[o] = 45;
if(!VoziloJeBicikla(GetVehicleModel(o)))
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(o, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(o, 0, 0, alarm, doors, bonnet, boot, objective);
}
if(DostavljacVozila(GetVehicleModel(o)))
{
ProduktiVozila[o] = 0;
}
}

I tried to compile gamemode that i didn't edited and it worked and it was all the same just without errors and without defining needed. What is that? HELP ME PLS.
Reply
#2

Quote:

/////////////////////////////////////////////////
new VoziloJeAvion,VoziloJeBrod,VoziloJeKamion,VoziloJe Motor,VoziloJeBicikla,DostavljacVozila;
for(new o; o < MAX_VOZILA; o++)
{
if(VoziloJeAvion(GetVehicleModel(o)) || VoziloJeBrod(GetVehicleModel(o)) || VoziloJeKamion(GetVehicleModel(o))) Fuel[o] = 80;
else if(VoziloJeMotor(GetVehicleModel(o))) Fuel[o] = 45;
else if(VoziloJeBicikla(GetVehicleModel(o)) || GetVehicleModel(o) == 53) Fuel[o] = 1000000;
else Fuel[o] = 45;
if(!VoziloJeBicikla(GetVehicleModel(o)))
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(o, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(o, 0, 0, alarm, doors, bonnet, boot, objective);
}
if(DostavljacVozila(GetVehicleModel(o)))
{
ProduktiVozila[o] = 0;
}
}

Look Like you have already declared your function.
PHP код:
stock VoziloJeAvion(vehicleid)
{
    
//......
}
stock VoziloJeBrod(vehicleid)
{
    
//......
}
stock VoziloJeKamion(vehicleid)
{
    
//......

You have already declared your function as the same name of varibales.
local variable "VoziloJeAvion" shadows a variable at a preceding level = 2 variables are declared local & global as same name
PHP код:
new VoziloJeAvionVoziloJeBrodVoziloJeKamionVoziloJe MotorVoziloJeBiciklaDostavljacVozila;  // thease are varibables, you can't use them as function 
Look here: VoziloJe Motor You can't use space in variables: (VoziloJe_Motor, this is valid)
Fix thease errors.
Reply
#3

My guess is you forgot a ; or a } right before this piece of code. When you do that you get the most disgusting errors you can imagine thrown at you.
Reply
#4

I tried to replace these lines with those that weren't edited it's completely same but without the
Quote:

new VoziloJeAvion,VoziloJeBrod,VoziloJeKamion,VoziloJe Motor,VoziloJeBicikla,DostavljacVozila;

And when i replaced it and compiled it there were 24 errors again,so i think the problem isn't in these lines...
Reply
#5

I deleted this
Quote:

new VoziloJeAvion,VoziloJeBrod,VoziloJeKamion,VoziloJe Motor,VoziloJeBicikla,DostavljacVozila;

But now i get these errors:

Quote:

C:\Users\Janko i Boba\Desktop\BWRP.pwn(12748 ) : error 017: undefined symbol "VoziloJeAvion"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12749) : error 017: undefined symbol "VoziloJeMotor"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12750) : error 017: undefined symbol "VoziloJeBicikla"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12752) : error 017: undefined symbol "VoziloJeBicikla"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12758 ) : error 017: undefined symbol "DostavljacVozila"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12812) : error 017: undefined symbol "UlicaKuce"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12820) : error 017: undefined symbol "UlicaKuce"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12824) : error 017: undefined symbol "UlicaKuce"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(12939) : error 017: undefined symbol "KreirajAtm"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(13180) : error 017: undefined symbol "DosadasnjiRekord"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(13181) : error 017: undefined symbol "Konektovano"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(13218 ) : error 017: undefined symbol "SavePlayer"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(13220) : error 017: undefined symbol "SacuvajFirmu"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(13221) : error 017: undefined symbol "SacuvajKucu"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(13222) : error 017: undefined symbol "SacuvajStan"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(13223) : error 017: undefined symbol "SacuvajVikendicu"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(13224) : error 017: undefined symbol "SacuvajATM"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(13824) : error 017: undefined symbol "SavePlayer"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(13838 ) : error 017: undefined symbol "ProveraRPImena"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(13840) : error 017: undefined symbol "StatusKonekta"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(13844) : error 017: undefined symbol "OcistiChat"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(13844) : error 017: undefined symbol "AttachObjectRemove"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(13844) : error 017: undefined symbol "ObrisiObjekte"
C:\Users\Janko i Boba\Desktop\BWRP.pwn(13844) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


24 Errors.



Here are the lines:

Quote:

public OnPlayerConnect(playerid)
{
SetPlayerScore(playerid,1);
AfkCheck[playerid] = 0;
//timer za online i record
SetTimerEx("RekordTimer", 3000, false, "d", playerid);
///////////////////////////////////////////////////////////////////////////////////
if(!ProveraRPImena(playerid))
{
StatusKonekta(playerid, 2);
return 1;
}
/////////////////////////////////////////////////////////////////////////////////////////
OcistiChat(playerid,16); AttachObjectRemove(playerid); ObrisiObjekte(playerid); KillTimer(GroveDrogaTimer[playerid]);
BelaBojaIgraca(playerid); KillTimer(VuciTimer[playerid]); KreirajTextDrawe(playerid); g_SetPlayerHealth(playerid, 99.0);
KillTimer(zeton[playerid]);
/////////////////////////////////////////////////////////////////////////////////////////
UGM[playerid] = 0; SkripterDuty[playerid] = 0; AdminDuty[playerid] = 0; GMDuty[playerid] = 0; SvercUlja[playerid] = 0; SvercDroge[playerid] = 0;
UlogovanProvera[playerid] = 0; Rentano[playerid] = 299; hPomoc[playerid] = 0; NewNew[playerid] = 0; SvercOruzija[playerid] = 0;
IgracKojimSaljes[playerid] = -1; LoginPokusaji[playerid] = 0; StavljeneLisice[playerid] = 0; KladionicaBroj[playerid] = 0;
IgracTazovan[playerid] = 0; PolicajacNaDuznosti[playerid] = 0; KaznuNapisao[playerid] = -1; hReport[playerid] = 0; IgracAnimira[playerid] = 0;
CenaKazne[playerid] = 0; Kaucija[playerid] = 0; DobioPay[playerid] = 0; Lociranje[playerid] = 0; SemeDrogeGrove[playerid] = 0; NDroga[playerid] = 0;
Poligon[playerid] = 0; KazneniPoeni[playerid] = 0; SvercMaterijala[playerid] = 0; UsaoFirma[playerid] = -1; Posadjena[playerid] = 0; GeneratorRadi[playerid] = 0;
MDC[playerid] = 0; Naocare[playerid] = false; gPlayerAnimLibsPreloaded[playerid] = 0; gPlayerUsingLoopingAnim[playerid] = 0;
BiraSkin[playerid] = false; SelectCharPlace[playerid] = 0; KoristiDrogu[playerid] = 0; SmeceSakuplja[playerid] = 0; CistiUlice[playerid] = 0;
Kockica[playerid] = 0; Marama[playerid] = 0; Zavezan[playerid] = 0; IzmenaFirme[playerid] = -1; AdminVozilo[playerid] = -1;
Prepreka1Kreirana[playerid] = false; Prepreka2Kreirana[playerid] = false; Prepreka3Kreirana[playerid] = false; KioskKupovina[playerid] = -1;
Prepreka4Kreirana[playerid] = false; VuceIgraca[playerid] = -1; vrataspawn[playerid] = false; DobioPay[playerid] = 0;
BranjeDroge[playerid] = 0; PokupljanjeDroge[playerid] = 0; PricauIntervju[playerid] = 255; IntervjuGotov[playerid] = 999; UsaoZgrada[playerid] = -1;
PuniGorivo[playerid] = false; PrikazanTextDraw[playerid] = 0; BusLinija[playerid] = 0; KosenjeTrave[playerid] = 0;
PosaoGPS[playerid] = 0; PonudioPopravku[playerid] = -1; CenaPopravke[playerid] = 0; PonudioGorivo[playerid] = -1;
CenaGoriva[playerid] = 0; PosaoOprema[playerid] = 0; PostaRaznesi[playerid] = 0; PostaPreuzmi[playerid] = 0; GrobarLinija[playerid] = 0;
TextDrawGangZone[playerid] = 0; TelefonRazgovor[playerid] = -1; TelefonZvoni[playerid] = false; KupovinaAuta[playerid] = false;
BunnyHop[playerid] = 0; MalterDovozi[playerid] = 0; PoravnaBagerom[playerid] = 0; LecenjeOd[playerid] = -1; CenaLecenja[playerid] = 0;
Oranje[playerid] = 0; Vrsenje[playerid] = 0; Mleko[playerid] = 0; VozLinija[playerid] = 0; UzeoKutiju[playerid] = 0;
TuraSF[playerid] = 0; TuraLV[playerid] = 0; LetSF[playerid] = 0; LetLV[playerid] = 0; ElektricarKvar[playerid] = 0;
RadioAktiviran[playerid] = 0; CenaProdaje[playerid] = 0; KomeProdaje[playerid] = -1; PonudioIgrac[playerid] = -1;
UsaoAutoProdaja[playerid] = -1; UsaoMotorProdaja[playerid] = -1; KacigaStavljena[playerid] = 0; UsaoAvionProdaja[playerid] = -1;
eData[playerid] = -1; BankomatMeni[playerid] = -1; UsaoPloviloProdaja[playerid] = -1; Zeton[playerid] = 0; KreiranStats[playerid] = 0;
///////////////////////////////////////////////////////////////////////////
PlayerInfo[playerid][pPozvan] = 0; PlayerInfo[playerid][pAdmin] = 0; PlayerInfo[playerid][pGM] = 0; PlayerInfo[playerid][pPromoter] = 0; PlayerInfo[playerid][pLottoNr] = 0; PlayerInfo[playerid][pLottoNr2] = 0; PlayerInfo[playerid][pLottoNr3] = 0; PlayerInfo[playerid][pLottoNr4] = 0; PlayerInfo[playerid][pLottoNr5] = 0; PlayerInfo[playerid][pLottoNr6] = 0;
PlayerInfo[playerid][pLottoNr7] = 0; PlayerInfo[playerid][pVip] = 0; PlayerInfo[playerid][pDonatorBodovi] = 0; PlayerInfo[playerid][pSmrti] = 0;
PlayerInfo[playerid][pLevel] = 0; PlayerInfo[playerid][pGodine] = 0; PlayerInfo[playerid][pDrzava] = 0; PlayerInfo[playerid][pSex] = 0;
PlayerInfo[playerid][pTutorial] = 0; PlayerInfo[playerid][pLider] = 0; PlayerInfo[playerid][pClan] = 0; PlayerInfo[playerid][pRank] = 0;
PlayerInfo[playerid][pWarn] = 0; PlayerInfo[playerid][pZatvor] = 0; PlayerInfo[playerid][pZatvorenVreme] = 0; PlayerInfo[playerid][pExp] = 0;
PlayerInfo[playerid][pTrazeniLevel] = 0; PlayerInfo[playerid][pUhapsenPuta] = 0; PlayerInfo[playerid][pDroga] = 0; PlayerInfo[playerid][pNDroga] = 0; PlayerInfo[playerid][pPasos] = 0; PlayerInfo[playerid][pOrgUgovor] = 0;
PlayerInfo[playerid][pMats] = 0; PlayerInfo[playerid][pPayDayPoeni] = 0; PlayerInfo[playerid][pSatiIgre] = 0; PlayerInfo[playerid][pIznosRate] = 0;
PlayerInfo[playerid][pIznosKredita] = 0; PlayerInfo[playerid][pPreostaloZaOtplatu] = 0; PlayerInfo[playerid][pADozvola] = 0; PlayerInfo[playerid][pPosedovanjeAuta] = -1;
PlayerInfo[playerid][pKamionDozvola] = 0; PlayerInfo[playerid][pAvionDozvola] = 0; PlayerInfo[playerid][pMotorDozvola] = 0; PlayerInfo[playerid][pPosedovanjeMotora] = -1;
PlayerInfo[playerid][pBrodDozvola] = 0; PlayerInfo[playerid][pGunDozvola] = 0; PlayerInfo[playerid][pPosedovanjeFirme] = -1; PlayerInfo[playerid][pDzeparosVreme] = 0;
PlayerInfo[playerid][pBorbeniStil] = 4; PlayerInfo[playerid][pMobilni] = 0; PlayerInfo[playerid][pImenik] = 0; PlayerInfo[playerid][pMobKredit] = 0;
PlayerInfo[playerid][pCigare] = 0; PlayerInfo[playerid][pUpaljac] = 0; PlayerInfo[playerid][pKanap] = 0; PlayerInfo[playerid][pNaocare] = 0; PlayerInfo[playerid][pKaciga] = -1;
PlayerInfo[playerid][pSat] = 0; PlayerInfo[playerid][pBorbeniStil] = 0; PlayerInfo[playerid][pPosao] = 0; PlayerInfo[playerid][pPosedovanjeStana] = -1;
PlayerInfo[playerid][pProveraSpawna] = 0; PlayerInfo[playerid][pPosedovanjeKuce] = -1; PlayerInfo[playerid][pRent] = -1; PlayerInfo[playerid][pPosedovanjeVikendice] = -1;
PlayerInfo[playerid][pPosedovanjeBicikla] = -1; PlayerInfo[playerid][pPosedovanjeAviona] = -1; PlayerInfo[playerid][pPosedovanjePlovila] = -1; HelpMessages[playerid] = 1;
/////////////////////////////////////////////////////////////////////////

Reply
#6

What's that horrible indentation of yours?

You can't spot an error like this, nor anyone will like to read through this.

You can use this to re-indent your code.
Reply
#7

I don't understand... What can i do with this?
Reply
#8

Use pastebin.com to paste your code.

We don't understand anything without the indentation.

indentation = spaces before lines.
Reply
#9

Here are the lines: http://pastebin.com/ABqyxrvG
Here are the errors: http://pastebin.com/PhKjYMME

Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)