[Pomoc] 4 errora kod texta

Započeo DeBlack, Septembar 01, 2011, 19:46:00 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: streetstories
Detaljan opis problema: Pa napravio sam da kod kuca/firmi pise: "ova firma/kuca je na prodaju...." i izbaci mi 4 errora, a nmg nikako maknit ih, nezz kako, pa ako morete pomoc bio bi zahvalan....
Dio skripte:
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseInfo[h][hOwned] == 0)
{
   if(HouseInfo[h][hSetted] == 1)
   {
   format(PropertyString,sizeof(PropertyString),"Kuca na Prodaju! \n Adresa: %s \n Kucni br: %d \n Level: %d \n Cijena: $%d \n da kupite: /kupikucu",HouseInfo[h][hDiscription], HouseInfo[h][hWorld], HouseInfo[h][hLevel], HouseInfo[h][hValue]);
HouseLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, 0, 1);
HousePickup[h] = CreateDynamicPickup(1273, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
}
}
else if(HouseInfo[h][hOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"Vlasnik %s \n Adresa: %s \n Kucni br: %d \n Level: %d \n Cijena renta: $%d  \n Najam: /rentroom", HouseInfo[h][hOwner], HouseInfo[h][hDiscription], HouseInfo[h][hWorld], HouseInfo[h][hLevel], HouseInfo[h][hRent]);
HouseLabel[h] = Create3DTextLabel(PropertyString ,0x00FFFFAA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, 0, 1);
HousePickup[h] = CreateDynamicPickup(1239, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
}
}
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(BizzInfo[h][bOwned] == 0)
{
   format(PropertyString,sizeof(PropertyString),"Firma na Prodaju! \n Level: %d \n Cijena: $%d \n da kupite: /kupifirmu", BizzInfo[h][bLevelNeeded], BizzInfo[h][bBuyPrice]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
else if(BizzInfo[h][bOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"%s \n Vlasnik: %s , Reket: %s \n Level: %d \n Za Ulazak Koristi, /enter.",BizzInfo[h][bMessage],BizzInfo[h][bOwner], BizzInfo[h][bExtortion], BizzInfo[h][bLevelNeeded]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
CreateDynamicPickup(1239,1,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],-1);
}



A evo ERRORI koje izbacuje:
D:\Balkan Expres Rol3play\gamemodes\BE.pwn(41299) : error 017: undefined symbol "PropertyString"
D:\Balkan Expres Rol3play\gamemodes\BE.pwn(41299) : error 017: undefined symbol "PropertyString"
D:\Balkan Expres Rol3play\gamemodes\BE.pwn(41299) : error 029: invalid expression, assumed zero
D:\Balkan Expres Rol3play\gamemodes\BE.pwn(41299) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Neke slike/video za lakse dobivanje pomoci(neobavezno): //
Poslednja Izmena: Septembar 01, 2011, 19:48:36 POSLE PODNE od DeBlack
      
DeBlack | Mapper | PS User

dragan12

Fali ti new PropertyString[128]; samo dodas to tu.
undefined symbol "PropertyString" - To znaci da ono u "" nije definisano ;)

Nece, jbg gdje to treba stavit??, u mene vak stoji:
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(BizzInfo[h][bOwned] == 0)
{
new PropertyString[128];
    format(PropertyString,sizeof(PropertyString),"Firma na Prodaju! \n Level: %d \n Cijena: $%d \n da kupite: /kupifirmu", BizzInfo[h][bLevelNeeded], BizzInfo[h][bBuyPrice]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
else if(BizzInfo[h][bOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"%s \n Vlasnik: %s , Reket: %s \n Level: %d \n Za Ulazak Koristi, /enter.",BizzInfo[h][bMessage],BizzInfo[h][bOwner], BizzInfo[h][bExtortion], BizzInfo[h][bLevelNeeded]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
CreateDynamicPickup(1239,1,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],-1);
}
      
DeBlack | Mapper | PS User

dragan12

for(new h = 0; h < sizeof(BizzInfo); h++)
{
               new PropertyString[128];
if(BizzInfo[h][bOwned] == 0)
{
   format(PropertyString,sizeof(PropertyString),"Firma na Prodaju! \n Level: %d \n Cijena: $%d \n da kupite: /kupifirmu", BizzInfo[h][bLevelNeeded], BizzInfo[h][bBuyPrice]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
else if(BizzInfo[h][bOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"%s \n Vlasnik: %s , Reket: %s \n Level: %d \n Za Ulazak Koristi, /enter.",BizzInfo[h][bMessage],BizzInfo[h][bOwner], BizzInfo[h][bExtortion], BizzInfo[h][bLevelNeeded]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
CreateDynamicPickup(1239,1,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],-1);
}

Stavi tako.


S. Moderator:

Napravio si krivo pa sam ispravio...
Poslednja Izmena: Septembar 01, 2011, 20:58:21 POSLE PODNE od BloodMaster

OPet mi izbacuje 4 errora, treba opet neki BizzLabel definirat al jbg nezz to....
Evo koje errore izbacuje na ovom djelu:
Skripta:
for(new h = 0; h < sizeof(BizzInfo); h++)
{
                new PropertyString[128];
if(BizzInfo[h][bOwned] == 0)
{
    format(PropertyString,sizeof(PropertyString),"Firma na Prodaju! \n Level: %d \n Cijena: $%d \n da kupite: /kupifirmu", BizzInfo[h][bLevelNeeded], BizzInfo[h][bBuyPrice]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
else if(BizzInfo[h][bOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"%s \n Vlasnik: %s , Reket: %s \n Level: %d \n Za Ulazak Koristi, /enter.",BizzInfo[h][bMessage],BizzInfo[h][bOwner], BizzInfo[h][bExtortion], BizzInfo[h][bLevelNeeded]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
CreateDynamicPickup(1239,1,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],-1);
}



ERRORI:
D:\Balkan Expres Rol3play\gamemodes\BE.pwn(12170) : error 017: undefined symbol "BizzLabel"
D:\Balkan Expres Rol3play\gamemodes\BE.pwn(12170) : warning 215: expression has no effect
D:\Balkan Expres Rol3play\gamemodes\BE.pwn(12170) : error 001: expected token: ";", but found "]"
D:\Balkan Expres Rol3play\gamemodes\BE.pwn(12170) : error 029: invalid expression, assumed zero
D:\Balkan Expres Rol3play\gamemodes\BE.pwn(12170) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
      
DeBlack | Mapper | PS User

Kod new stavi :


new Text3D:PropertyString;

ili

new Text3D:BizLabel; nisam citao pa nemam pojma :S

i onda stavljaj pod /sellbiz i ostalo da ti sakrije/pokaze te 3d textove kada kupi/proda ...
Poslednja Izmena: Septembar 01, 2011, 22:22:20 POSLE PODNE od [TG]Nxidza

Ma neradi se o 3D textu, vec ono kad stanes pred kucu pa ti se pokaze text: "ova kuca je na prodaju.......".... A imam i prob sa 3D textom al to cu kasnje sedit kad ovo uradim....... Jbg valjda ima neko da zna prob. sa ti BizzLabel...
      
DeBlack | Mapper | PS User

Citat: DeBlack poslato Septembar 01, 2011, 22:37:04 POSLE PODNE
Ma neradi se o 3D textu, vec ono kad stanes pred kucu pa ti se pokaze text: "ova kuca je na prodaju.......".... A imam i prob sa 3D textom al to cu kasnje sedit kad ovo uradim....... Jbg valjda ima neko da zna prob. sa ti BizzLabel...
Aplauz za tebe,a sta je to nego 3d text,textdraw da nije ? -.-

cu nije 3d text
a sta je ovo
BizzLabel[h] = Create3DTextLabel
poslusaj nxidzu i uradi kako ti neko kaze ako neznas ;)

dragan12

@Nxidza
Nce to raditi kao sto vidis ima i [h] tako da mu treba deo gde da definise i to u [] zagradama tacnije BizzInfo,a PropertyString je bio string ne 3DText :D new Text3D:BizzLabel[sizeof(BizzInfo)]; Mislim da tako pise kod tebe BizzInfo koliko sam video.

Gagi_Corleone uradio sam kako si reko i izbacilo mi je 1 error i 1 warning:
D:\Balkan Expres Rol3play\gamemodes\BE.pwn(41631) : warning 209: function "CustomPickups" should return a value
D:\Balkan Expres Rol3play\gamemodes\BE.pwn(41632) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.


Dio skripte:
for(new h = 0; h < sizeof(BizzInfo); h++)
{
        new Text3D:BizzLabel[sizeof(BizzInfo)];
        new PropertyString[128];
if(BizzInfo[h][bOwned] == 0)
{
    format(PropertyString,sizeof(PropertyString),"Firma na Prodaju! \n Level: %d \n Cijena: $%d \n da kupite: /kupifirmu", BizzInfo[h][bLevelNeeded], BizzInfo[h][bBuyPrice]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
else if(BizzInfo[h][bOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"%s \n Vlasnik: %s , Reket: %s \n Level: %d \n Za Ulazak Koristi, /enter.",BizzInfo[h][bMessage],BizzInfo[h][bOwner], BizzInfo[h][bExtortion], BizzInfo[h][bLevelNeeded]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);

}
CreateDynamicPickup(1239,1,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],-1);
}
}


Nxidza sryy na ono 3D text, jbg stari mi nije bio 3D text pa mi on bio na pameti, a ovaj novi ( sada ) jest....
      
DeBlack | Mapper | PS User

dragan12

41631 red System je jednom rekao ovo:
Citat: System32 poslato Jul 23, 2011, 14:25:02 POSLE PODNE
kad ti dode warning 209: function "cmd_Izbaci" should return a value zanci da ti negdje fali }
Ali fali zagrada samo akd imam 26 errora?
ne ja sam par puta imao taakv problem, napravim 2 koamnde i dode mi taj warning i onda pogledam zagrade i vidim da u jednoj nema zagrade
a ako imas zagrade znaci da iznad te } dodaj return 1;
Pa ti prouci on je sve objasnio :)
41632 daj taj red da ga vidim.

Evo sredio sam sve errore i warninge ( bila na 1 mjestu viska zagrada ), a sada kad compilam i kad odem kod neke kuce ppise sve kao sto je pisalo staro ( nepise ovaj novi 3D text sta sam stavio ), a za formu nista nepise, odem i nista, samo stoji onaj checpoint... evo:
for(new h = 0; h < sizeof(SBizzInfo); h++)
{
if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))
{
format(string, sizeof(string), "~w~%s~n~~r~Proizvodi podrazumevaju~w~: %d~n~~y~Cijena po proizvodu: ~w~: $%d~n~~g~Novcana sredstva: ~w~: $%d",SBizzInfo[h][sbMessage],(SBizzInfo[h][sbMaxProducts]-SBizzInfo[h][sbProducts]),SBizzInfo[h][sbPriceProd],SBizzInfo[h][sbTill]);
GameTextForPlayer(i, string, 5000, 3);
return 1;
}
if(PlayerToPoint(2.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))
{
if(SBizzInfo[h][sbOwned] == 1)
{
format(string, sizeof(string), "~w~%s~g~~n~Vlasnik ~w~%s~n~Iznuda: %s~n~Ulaznica: $%d ~n~~y~(/enter)",SBizzInfo[h][sbMessage],SBizzInfo[h][sbOwner],SBizzInfo[h][sbExtortion],SBizzInfo[h][sbEntranceCost]);
}
else
{
format(string, sizeof(string), "~g~Na prodaju~n~~w~%s~n~~w~$%d~n~%d Level~n~~y~(/buybiz)",SBizzInfo[h][sbMessage],SBizzInfo[h][sbBuyPrice],SBizzInfo[h][sbLevelNeeded]);
}
GameTextForPlayer(i, string, 5000, 3);
return 1;
}
}
  for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(PlayerToPoint(2.0, i, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
{
if(HouseInfo[h][hOwned] == 1)
{
if(HouseInfo[h][hRentabil] == 0)
{
format(string, sizeof(string), "~g~Vlasnik~n~~w~%s~n~%d Level",HouseInfo[h][hOwner],HouseInfo[h][hLevel]);
}
else
{
format(string, sizeof(string), "~g~Vlasnik~n~~w~%s~n~Iznajmi: $%d Level: %d~n~~y~(/rentroom)",HouseInfo[h][hOwner],HouseInfo[h][hRent],HouseInfo[h][hLevel]);
}
GameTextForPlayer(i, string, 5000, 3);
return 1;
}
else
{
format(string, sizeof(string), "~g~PRODAJA~n~~w~%s~n~$%d~n~%d Level~n~~y~(/kupikucu)",HouseInfo[h][hDiscription],HouseInfo[h][hValue],HouseInfo[h][hLevel]);
}
GameTextForPlayer(i, string, 5000, 3);
return 1;
}
}
   for(new h = 0; h < sizeof(BizzInfo); h++)
{
       new Text3D:BizzLabel[sizeof(BizzInfo)];
       new PropertyString[128];
if(BizzInfo[h][bOwned] == 0)
{
   format(PropertyString,sizeof(PropertyString),"Firma na Prodaju! \n Level: %d \n Cijena: $%d \n da kupite: /kupifirmu", BizzInfo[h][bLevelNeeded], BizzInfo[h][bBuyPrice]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
else if(BizzInfo[h][bOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"%s \n Vlasnik: %s , Reket: %s \n Level: %d \n Za Ulazak Koristi, /enter.",BizzInfo[h][bMessage],BizzInfo[h][bOwner], BizzInfo[h][bExtortion], BizzInfo[h][bLevelNeeded]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);

}
CreateDynamicPickup(1239,1,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],-1);
}
}


Eto tu, SBizzInfo, HouseInfo, BizzInfo i nista neradi a nema warninga ni errora.......

EDIT: napravio sam ovo, samo imam problem oko neceg drugog....... U vezi ove teme moze ic LOCK
Poslednja Izmena: Septembar 02, 2011, 13:59:07 POSLE PODNE od DeBlack
      
DeBlack | Mapper | PS User