Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2011-04-07, 21:31


KoLoSs

www.pKoLoSs.tk






Wiek: 31
Na forum: 5632 dni
Posty: 109
Nick w MP: KoLoSs

Piwa: 593

Respekt: 55,1

Ostrzeżeń: 20%
daj ca?y kod ;o .
bo tu nie widze 155 linijek ;d

Podpis
coś dla uczących się pawn! moje prace, z dnia na dzień coś nowego. !

www.pKoLoSs.tk
+ reklama w stopce strony.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-04-07, 21:41


krzyzan







Wiek: 30
Na forum: 5670 dni
Posty: 387

Piwa: 2132

Respekt: 135
Respekt: 135

Tutaj by?o brak klamer tu masz popraione
Kod:

if(pickupid == bron)
{
GivePlayerWeapon(playerid, 38, 9999);//minigun
}
if(pickupid == bron)
{
GivePlayerWeapon(playerid, 39, 9999);//wybuchowe
}
if(pickupid == bron)
{
GivePlayerWeapon(playerid, 34, 9999);//snajperka
}
if(pickupid == bron)
{
GivePlayerWeapon(playerid, 32, 9999);//tec9
}
if(pickupid == bron)
{
GivePlayerWeapon(playerid, 31, 9999);//m4
}
if(pickupid == bron)
{
GivePlayerWeapon(playerid, 26, 9999);//obrzyn
}
if(pickupid == bron)
{
GivePlayerWeapon(playerid, 24, 9999);//DesterEagle
}
if(pickupid == bron)
{
GivePlayerWeapon(playerid, 16, 9999);//granaty
}
if(pickupid == bron)
{
GivePlayerWeapon(playerid, 4, 1);//n??
}
if(pickupid == bron)
{
GivePlayerWeapon(playerid, 9, 1);//pi?a
}
}
}
}

P.S.Je?eli dalej b?dzie b??d usu? 3 klamry od ko?ca.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-04-11, 15:38


dowolny







Wiek: 36
Na forum: 5726 dni
Posty: 7
Nick w MP: Dusty_Drucker



Respekt: 50

Witam.
zrobi?em bram? na klikni?cie ale wyskakuj? mi takie errory przy kompilowaniu

Kod:

C:\Users\patryk\Desktop\brama na klawisz2.pwn(3) : error 020: invalid symbol name ""
C:\Users\patryk\Desktop\brama na klawisz2.pwn(4) : error 020: invalid symbol name ""
C:\Users\patryk\Desktop\brama na klawisz2.pwn(107) : error 026: no matching "#if..."
C:\Users\patryk\Desktop\brama na klawisz2.pwn(108) : error 026: no matching "#if..."
C:\Users\patryk\Desktop\brama na klawisz2.pwn(113) : error 029: invalid expression, assumed zero
C:\Users\patryk\Desktop\brama na klawisz2.pwn(113) : error 017: undefined symbol "NAZWA_BRAMY"
C:\Users\patryk\Desktop\brama na klawisz2.pwn(113) : error 029: invalid expression, assumed zero
C:\Users\patryk\Desktop\brama na klawisz2.pwn(113) : fatal error 107: too many error messages on one line



KOD jest taki:

Kod:

#include <a_samp>

new [NAZWA_BRAMY];// NAZWA BRAMY
new [NAZWA_BRAMY]State = 1;// NAZWA BRAMY >>2<< - MUSI BY?

//DEFINICJE KOLOR?W - USUN??EM PONIEWA? ZA DU?O MIEJSCA ZAJMOWA?Y

#else
#endif


public OnGameModeInit()
{
[NAZWA_BRAMY] = CreateObject(3472, 1481.1949, -1741.5649, 6.666, 0, 0, 0);// ID I KOORDY BRAMY ZAMKNI?TEJ - TWORZY POBIEKT
return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys==KEY_FIRE)// NA JAKI KLAWISZ NA DZIALAC
{
new string[256];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));

if(IsACop(playerid) || IsAHA(playerid) || PlayerInfo[playerid][pAdmin] >= 1338) //KTO MO?E OTWIERA? BRAM?
{
if(PlayerToPoint(10.0, playerid, MAX X, MIN X, Z - WYSOKO??) || PlayerToPoint(10.0, playerid, MAX Y, NIC Y, Z - WYSOKO??)) //KOORDY STREFY W KT?REJ MA DZIA?A? PRZYCISK OTWIERAJ?CY/ZAMYKAJ?CY BRAME
{
if(BramaPolicjaState == 1)
{
format(string, sizeof(string), "* %s wdusza przycisk na pilocie od bramy.", sendername); //CO MA SI? POKAZA? NA CZACIE
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveObject([NAZWA_BRAMY], 1595.4099, -1638.2567, 14.0207, 2.5); // KOORDY Z BRAMY OTWARTEJ
SetObjectRot([NAZWA_BRAMY], 0, 359.1406, 0); //ROTACJA BRAMY
[NAZWA_BRAMY]State = 0;

ApplyAnimation(playerid,"PED","bomber",4.1,0,0,0,0,0);

}
else
{
ApplyAnimation(playerid,"PED","bomber",4.1,0,0,0,0,0);
format(string, sizeof(string), "* %s wdusza przycisk na pilocie od bramy.", sendername); //CO MA SI? POKAZA? NA CZACIE
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveObject([NAZWA_BRAMY], 1588.5547, -1638.2567, 14.0207, 2.5); //KOORDY Z BRAMY ZAMKNI?TEJ
SetObjectRot([NAZWA_BRAMY], 0, 359.1406, 0); //ROTACJA BRAMY
[NAZWA_BRAMY]State = 1;
}
}
}

return 1;
}




prosz? o szybko? pomoc.

PS.
nie patrzcie na koodry i nazw? bramy powiewa? zrobi?em sobie wzornik ?eby z niego robi? nast?pne

ZA pomoc oczywi?cie :piwo: :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-04-11, 15:43


adrian_pl_20







Wiek: 31
Na forum: 6684 dni
Posty: 155
Nick w MP: adrian_w

Piwa: 1568

Respekt: 111
Respekt: 111

Kod:

#include <a_samp>

new Brama;// NAZWA BRAMY
new State = 1;// NAZWA BRAMY >>2<< - MUSI BY?

//DEFINICJE KOLOR?W - USUN??EM PONIEWA? ZA DU?O MIEJSCA ZAJMOWA?Y

#else
#endif


public OnGameModeInit()
{
Brama = CreateObject(3472, 1481.1949, -1741.5649, 6.666, 0, 0, 0);// ID I KOORDY BRAMY ZAMKNI?TEJ - TWORZY POBIEKT
return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys==KEY_FIRE)// NA JAKI KLAWISZ NA DZIALAC
{
new string[256];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));

if(IsACop(playerid) || IsAHA(playerid) || PlayerInfo[playerid][pAdmin] >= 1338) //KTO MO?E OTWIERA? BRAM?
{
if(PlayerToPoint(10.0, playerid, MAX X, MIN X, Z - WYSOKO??) || PlayerToPoint(10.0, playerid, MAX Y, NIC Y, Z - WYSOKO??)) //KOORDY STREFY W KT?REJ MA DZIA?A? PRZYCISK OTWIERAJ?CY/ZAMYKAJ?CY BRAME
{
if(State == 1)
{
format(string, sizeof(string), "* %s wdusza przycisk na pilocie od bramy.", sendername); //CO MA SI? POKAZA? NA CZACIE
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveObject(Brama, 1595.4099, -1638.2567, 14.0207, 2.5); // KOORDY Z BRAMY OTWARTEJ
SetObjectRot(Brama, 0, 359.1406, 0); //ROTACJA BRAMY
State = 0;

ApplyAnimation(playerid,"PED","bomber",4.1,0,0,0,0,0);

}
else
{
ApplyAnimation(playerid,"PED","bomber",4.1,0,0,0,0,0);
format(string, sizeof(string), "* %s wdusza przycisk na pilocie od bramy.", sendername); //CO MA SI? POKAZA? NA CZACIE
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveObject(Brama, 1588.5547, -1638.2567, 14.0207, 2.5); //KOORDY Z BRAMY ZAMKNI?TEJ
SetObjectRot(Brama, 0, 359.1406, 0); //ROTACJA BRAMY
State = 1;
}
}
}

return 1;
}


Podpis
Oglądaj filmy i seriale online za darmo, bez reklam i limitów

http://maxkino.tv
Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-04-11, 15:47


BraYaN_







Wiek: 34
Na forum: 6603 dni
Posty: 276
Nick w MP: BraYaN_

Piwa: 1614

Respekt: 63

No, ale w?a?nie przez nazw? bramy s? errory.
Kod:

#include <a_samp>

new NAZWA_BRAMY;// NAZWA BRAMY
new NAZWA_BRAMYState = 1;// NAZWA BRAMY >>2<< - MUSI BY?

//DEFINICJE KOLOR?W - USUN??EM PONIEWA? ZA DU?O MIEJSCA ZAJMOWA?Y


public OnGameModeInit()
{
NAZWA_BRAMY = CreateObject(3472, 1481.1949, -1741.5649, 6.666, 0, 0, 0);// ID I KOORDY BRAMY ZAMKNI?TEJ - TWORZY POBIEKT
return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys==KEY_FIRE)// NA JAKI KLAWISZ NA DZIALAC
{
new string[256];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));

if(IsACop(playerid) || IsAHA(playerid) || PlayerInfo[playerid][pAdmin] >= 1338) //KTO MO?E OTWIERA? BRAM?
{
if(PlayerToPoint(10.0, playerid, MAX X, MIN X, Z - WYSOKO??) || PlayerToPoint(10.0, playerid, MAX Y, NIC Y, Z - WYSOKO??)) //KOORDY STREFY W KT?REJ MA DZIA?A? PRZYCISK OTWIERAJ?CY/ZAMYKAJ?CY BRAME
{
if(BramaPolicjaState == 1)
{
format(string, sizeof(string), "* %s wdusza przycisk na pilocie od bramy.", sendername); //CO MA SI? POKAZA? NA CZACIE
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveObject([NAZWA_BRAMY], 1595.4099, -1638.2567, 14.0207, 2.5); // KOORDY Z BRAMY OTWARTEJ
SetObjectRot([NAZWA_BRAMY], 0, 359.1406, 0); //ROTACJA BRAMY
[NAZWA_BRAMY]State = 0;

ApplyAnimation(playerid,"PED","bomber",4.1,0,0,0,0,0);
}
else
{
ApplyAnimation(playerid,"PED","bomber",4.1,0,0,0,0,0);
format(string, sizeof(string), "* %s wdusza przycisk na pilocie od bramy.", sendername); //CO MA SI? POKAZA? NA CZACIE
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveObject([NAZWA_BRAMY], 1588.5547, -1638.2567, 14.0207, 2.5); //KOORDY Z BRAMY ZAMKNI?TEJ
SetObjectRot(NAZWA_BRAMY, 0, 359.1406, 0); //ROTACJA BRAMY
NAZWA_BRAMYState = 1;
}
}
}
}
return 1;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-04-11, 15:58


dowolny







Wiek: 36
Na forum: 5726 dni
Posty: 7
Nick w MP: Dusty_Drucker



Respekt: 50

nadal sa errory ;/
w BraYaN_,
Kod:

C:\Users\patryk\Desktop\autobrama.pwn(23) : error 017: undefined symbol "PlayerInfo"
C:\Users\patryk\Desktop\autobrama.pwn(23) : warning 215: expression has no effect
C:\Users\patryk\Desktop\autobrama.pwn(23) : error 001: expected token: ";", but found "]"
C:\Users\patryk\Desktop\autobrama.pwn(23) : error 029: invalid expression, assumed zero
C:\Users\patryk\Desktop\autobrama.pwn(23) : fatal error 107: too many error messages on one line


a w adrian_pl_20,
Kod:

C:\Users\patryk\Desktop\autobrama.pwn(23) : error 017: undefined symbol "PlayerInfo"
C:\Users\patryk\Desktop\autobrama.pwn(23) : warning 215: expression has no effect
C:\Users\patryk\Desktop\autobrama.pwn(23) : error 001: expected token: ";", but found "]"
C:\Users\patryk\Desktop\autobrama.pwn(23) : error 029: invalid expression, assumed zero
C:\Users\patryk\Desktop\autobrama.pwn(23) : fatal error 107: too many error messages on one line


Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-04-11, 16:00


adrian_pl_20







Wiek: 31
Na forum: 6684 dni
Posty: 155
Nick w MP: adrian_w

Piwa: 1568

Respekt: 111
Respekt: 111

zamien linijke 23
Kod:

if(IsACop(playerid) || IsAHA(playerid) || PlayerInfo[playerid][pAdmin] >= 1338) //KTO MO?E OTWIERA?

na
Kod:

if(IsACop(playerid) || IsAHA(playerid) || IsPlayerAdmin(playerid)) //KTO MO?E OTWIERA?


Podpis
Oglądaj filmy i seriale online za darmo, bez reklam i limitów

http://maxkino.tv
Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-04-11, 16:02


dowolny







Wiek: 36
Na forum: 5726 dni
Posty: 7
Nick w MP: Dusty_Drucker



Respekt: 50

nadal s? takie:

Kod:


C:\Users\patryk\Desktop\brama na klawisz2.pwn(8) : error 026: no matching "#if..."
C:\Users\patryk\Desktop\brama na klawisz2.pwn(9) : error 026: no matching "#if..."
C:\Users\patryk\Desktop\brama na klawisz2.pwn(26) : error 017: undefined symbol "PlayerInfo"
C:\Users\patryk\Desktop\brama na klawisz2.pwn(26) : warning 215: expression has no effect
C:\Users\patryk\Desktop\brama na klawisz2.pwn(26) : error 001: expected token: ";", but found "]"
C:\Users\patryk\Desktop\brama na klawisz2.pwn(26) : error 029: invalid expression, assumed zero
C:\Users\patryk\Desktop\brama na klawisz2.pwn(26) : fatal error 107: too many error messages on one line


Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-04-11, 18:32


adrian_pl_20







Wiek: 31
Na forum: 6684 dni
Posty: 155
Nick w MP: adrian_w

Piwa: 1568

Respekt: 111
Respekt: 111

z tego co widac to zn?w jakis inny plik wiec moze bys ?askawie linijki poda?? i usun to
Kod:

#else
#endif


Podpis
Oglądaj filmy i seriale online za darmo, bez reklam i limitów

http://maxkino.tv
Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-04-11, 18:40


KoLoSs

www.pKoLoSs.tk






Wiek: 31
Na forum: 5632 dni
Posty: 109
Nick w MP: KoLoSs

Piwa: 593

Respekt: 55,1

Ostrzeżeń: 20%
Yoo.. w pawn robie ju? du?o czasu.. robi?em teraz mapke ale jednak co? mi si? przytrafi?o ;o.
w linijkach od 36 do 66 s? takie b??dy:
Kod:

error 035: argument type mismatch (argument 1)


a tu macie ten kod:
Kod:


public OnGameModeInit()
{
new IdSkinu[44] = {
24, 25, 28, 29, 66, 67, 80, 81, 83, 101, 102, 103, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 120, 122,
124, 143, 144, 156, 173, 174, 175, 176, 177, 181, 182, 183, 184, 269,
270, 271
};
AddPlayerClass(IdSkinu, 2140.8190,986.2273,10.8203); /* LV */ //Linijka 36
AddPlayerClass(IdSkinu, 2284.5417,610.5927,10.3899); /* Molo-LV */
AddPlayerClass(IdSkinu, 829.2312,-2061.2258,12.8671); /* Molo-LS */
AddPlayerClass(IdSkinu, 419.7180,2531.4226,16.6069); /* Pustynia */
AddPlayerClass(IdSkinu, 1670.3151,1643.5046,10.8203); /* LV-Lot */
AddPlayerClass(IdSkinu, 1925.6255,-2448.7561,13.5391); /* LS-Lot */
AddPlayerClass(IdSkinu, 1884.2405,-1382.0793,13.5727); /* Skate */
AddPlayerClass(IdSkinu, 1108.0354,1793.5688,10.8203); /* Bus */
AddPlayerClass(IdSkinu, -1090.0961,-1633.9072,76.3672); /* Wies */
AddPlayerClass(IdSkinu, -2640.3560,1375.6440,7.1446); /* Party2 */
AddPlayerClass(IdSkinu, -2475.4331,1548.4403,33.2273); /* Statek */
AddPlayerClass(IdSkinu, 2157.6326,504.9839,-55.5944); /* Podwoda */
AddPlayerClass(IdSkinu, -558.6748,-484.7808,25.5234); /* Tir */
AddPlayerClass(IdSkinu, 2387.5105,1035.7004,10.8203); /* Tune-LV */
AddPlayerClass(IdSkinu, 2645.1799,-2009.2134,13.5547); /* Tune-LS */
AddPlayerClass(IdSkinu, -924.3400,2019.7234,60.9141); /* Tama */
AddPlayerClass(IdSkinu, -2301.9609,-1648.8076,483.6195); /* Gora */
AddPlayerClass(IdSkinu, -2707.9387,217.5021,4.1797); /* Tune-SF */
AddPlayerClass(IdSkinu, -1971.9948,288.3572,35.1719); /* SF */
AddPlayerClass(IdSkinu, -841.3732,-1940.7094,12.5643); /* Bagno */
AddPlayerClass(IdSkinu, 2294.0693,558.9081,7.7813); /* Port */
AddPlayerClass(IdSkinu, 621.3671,860.8145,-42.9534); /* Kopalania */
AddPlayerClass(IdSkinu, 2888.9180,-2046.8844,5.4145); /* Plaza */
AddPlayerClass(IdSkinu, 351.2140,-1792.0101,4.9630); /* Plaza2 */
AddPlayerClass(IdSkinu, 486.9058,-13.6613,1000.6797); /* Party */
AddPlayerClass(IdSkinu, 2860.2930,1316.5461,11.3906); /* Tram */
AddPlayerClass(IdSkinu, 2265.0869,1398.5955,42.8203); /* G1 */
AddPlayerClass(IdSkinu, -2403.1597,-598.4803,132.6484); /* G2 */
AddPlayerClass(IdSkinu, -377.6356,1645.8422,198.4125); /* G3 */
AddPlayerClass(IdSkinu, 2500.5952,-1669.4454,13.3532); /* LS */
AddPlayerClass(IdSkinu, -1481.7755,-125.1818,14.1484); /* SF-Lot */ // Linijka 66

return SetGameModeText(">.>");
}

PS: to kawa?ek mapki..
za pomoc piwka.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-04-11, 18:45


adrian_pl_20







Wiek: 31
Na forum: 6684 dni
Posty: 155
Nick w MP: adrian_w

Piwa: 1568

Respekt: 111
Respekt: 111

ale o co tu chodzi? bo nie rozumiem

Podpis
Oglądaj filmy i seriale online za darmo, bez reklam i limitów

http://maxkino.tv
Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-04-11, 18:47


krzyzan







Wiek: 30
Na forum: 5670 dni
Posty: 387

Piwa: 2132

Respekt: 135
Respekt: 135

yy mo?e przez to };

Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-04-11, 18:48


KoLoSs

www.pKoLoSs.tk






Wiek: 31
Na forum: 5632 dni
Posty: 109
Nick w MP: KoLoSs

Piwa: 593

Respekt: 55,1

Ostrzeżeń: 20%
to s? miejsca spawnu graczy..


Kod:

new IdSkinu[44] = {
24, 25, 28, 29, 66, 67, 80, 81, 83, 101, 102, 103, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 120, 122,
124, 143, 144, 156, 173, 174, 175, 176, 177, 181, 182, 183, 184, 269,
270, 271

to s? id skin?w..
Kod:

AddPlayerClass(IdSkinu, 2140.8190,986.2273,10.8203); /* LV */ //Linijka 36

a to i reszta to jest spawn w pozycji .. "IdSkinu" to jest id skinu kt?ry tam si? spawni.
np zamiast dodawa? zawsze id kin?w.. to zrobi?em losowo u?ywaj?c wszystkich napisanych id.



"krzyzan" napisał/a:

yy mo?e przez to };

ehh. to nie ma nic wsp?lnego z tamtym spawnem.. to jest tylko zako?czenie listy id skin?w .

Ostatnio zmieniony przez KoLoSs 2011-04-11, 18:57, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-04-11, 18:54


krzyzan







Wiek: 30
Na forum: 5670 dni
Posty: 387

Piwa: 2132

Respekt: 135
Respekt: 135

tak ale ten ?rednik
jak nie to nie wiem

Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-04-11, 18:55


MG303







Wiek: 30
Na forum: 6419 dni
Posty: 654

Piwa: 2990

Respekt: 231,6
Respekt: 231,6Respekt: 231,6

a czasem AddPlayerClass nie ma wi?cej argument?w?
np.
Kod:

AddPlayerClass(0,1975.3922,959.2426,52.7387,83.1574,0,0,0,0,0,0


Ty poda?e? tylko wsp??rz?dne :p

nie wiem czy o to chodzi ale zdaje mi si? ?e tak

Postaw piwo autorowi tego posta
 

 
Tagi: błędy :: przy :: kompilacji :: rozwiązanie
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » BŁĘDY PRZY KOMPILACJI - ROZWIĄZANIE Odpowiedz do tematu

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku