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

Wysłany: 2014-03-03, 17:22


ekicam2

KISS






Wiek: 28
Na forum: 5602 dni
Posty: 31
Nick w MP: ekicam2

Piwa: 11

Respekt: 50

error:
Kod:

truckserv.pwn(212 -- 222) : error 032: array index out of bounds (variable "gracz")


globalnie
Kod:

enum p_Info{
nick[MAX_PLAYER_NAME],
password[32],
money,
bank,
cars[5],
frakcja,
frakcja_ranga
};

new gracz[MAX_PLAYERS][p_Info];



Kod:

new query[128];
GetPlayerName(playerid, gracz[playerid][nick], MAX_PLAYER_NAME);
format(query, sizeof(query), "SELECT password, money, bank, frakcja, frakcja_ranga, car1, car2, car3, car4, car5 FROM gracze WHERE nick = %s", gracz[playerid][nick]);
mysql_query(query);
mysql_store_result();
mysql_fetch_row(data);
sscanf(data, "p<|>s[32]iiiiiiiii",
gracz[playerid][password],
gracz[playerid][money],
gracz[playerid][bank],
gracz[playerid][frakcja],
gracz[playerid][frakcja_ranga],
gracz[playerid][cars][1],
gracz[playerid][cars][2],
gracz[playerid][cars][3],
gracz[playerid][cars][4],
gracz[playerid][cars][5]);


Podpis


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-03-03, 19:09


MoDeR







Wiek: 38
Na forum: 5241 dni
Posty: 8
Nick w MP: Erdo

Piwa: 42

Respekt: 50

Cze??, postanowilem sie bobawic i wyciagnac skrypt garazy. Jednak pojawil mi sie 1 error. Z tego co zrozumialem to chodzi o jakas niezamknieta linijke, ale nie moge jej wyszukac.

ERROR:
Kod:

C:\x\x\x\garazetest.pwn(137) : warning 217: loose indentation
C:\x\x\x\garazetest.pwn(144) : warning 217: loose indentation
C:\x\x\x\garazetest.pwn(541) : error 030: compound statement not closed at the end of file (started at line 265)

A to ta linijka:







Za pomoc oczywiscie zimny browarek :) Dzieki!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-03-03, 19:32


ekicam2

KISS






Wiek: 28
Na forum: 5602 dni
Posty: 31
Nick w MP: ekicam2

Piwa: 11

Respekt: 50

@UP kod powy?ej 200 linijek na pastebina- lepiej si? czyta plus sprawd? tym http://codegenerators.pl/

Podpis


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-03-03, 20:05


MoDeR







Wiek: 38
Na forum: 5241 dni
Posty: 8
Nick w MP: Erdo

Piwa: 42

Respekt: 50

"ekicam2" napisał/a:

@UP kod powy?ej 200 linijek na pastebina- lepiej si? czyta plus sprawd? tym http://codegenerators.pl/






Dzieki, to poprawi?o mi warningi ;) Zosta? ten jeden error. Bede wdzieczny jak ktos zobaczy w kod i sproboje powiedziec o co chodzi lub wskaze mi ten blad. Browarek dla Ciebie ekicam2 idzie ;D

Kod:

C:\x\x\x\garazetest.pwn(541) : error 030: compound statement not closed at the end of file (started at line 265)



Jak napisales: http://pastebin.com/RBFJcKnG

Dzieki osobie ktora poswieci chwilke czasu :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-03-03, 20:12


=X=

WUJCIO DOBRA RADA






Wiek: 52
Na forum: 4524 dni
Posty: 134
SPONSOR

Piwa: 641

Respekt: 209,5
Respekt: 209,5Respekt: 209,5

Ostrzeżeń: 100%
"MoDeR" napisał/a:

Cze??, postanowilem sie bobawic i wyciagnac skrypt garazy. Jednak pojawil mi sie 1 error. Z tego co zrozumialem to chodzi o jakas niezamknieta linijke, ale nie moge jej wyszukac.

ERROR:
Kod:

C:\x\x\x\garazetest.pwn(137) : warning 217: loose indentation
C:\x\x\x\garazetest.pwn(144) : warning 217: loose indentation
C:\x\x\x\garazetest.pwn(541) : error 030: compound statement not closed at the end of file (started at line 265)

A to ta linijka:







Za pomoc oczywiscie zimny browarek :) Dzieki!


Oczekujesz pomocy? przyk?adaj si? do dawania mo?liwie kompletnego kodu + new, #define itd. a czas pomocy si? zmniejszy.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-03-03, 20:56


MoDeR







Wiek: 38
Na forum: 5241 dni
Posty: 8
Nick w MP: Erdo

Piwa: 42

Respekt: 50

"=X=" napisał/a:

"MoDeR" napisał/a:

Cze??, postanowilem sie bobawic i wyciagnac skrypt garazy. Jednak pojawil mi sie 1 error. Z tego co zrozumialem to chodzi o jakas niezamknieta linijke, ale nie moge jej wyszukac.

ERROR:
Kod:

C:\x\x\x\garazetest.pwn(137) : warning 217: loose indentation
C:\x\x\x\garazetest.pwn(144) : warning 217: loose indentation
C:\x\x\x\garazetest.pwn(541) : error 030: compound statement not closed at the end of file (started at line 265)

A to ta linijka:







Za pomoc oczywiscie zimny browarek :) Dzieki!


Oczekujesz pomocy? przyk?adaj si? do dawania mo?liwie kompletnego kodu + new, #define itd. a czas pomocy si? zmniejszy.





Zaczynam... jak pisalem ten "system" wyciagalem z mapy... a wiec nie jest moj tylko proboje sie pobawic. Tak, dla Twojej wiadomosci oczekuje pomocy...

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-03-18, 17:29


szmon1234







Wiek: 27
Na forum: 5642 dni
Posty: 2
Nick w MP: Bl@dI.



Respekt: 50

Wiecie mo?e co oznaczaj? te b??dy?

C:\Documents and Settings\Administrator\Pulpit\ppa.pwn(9225) : error 017: undefined symbol "strrest"
C:\Documents and Settings\Administrator\Pulpit\ppa.pwn(9225) : error 033: array must be indexed (variable "String")
C:\Documents and Settings\Administrator\Pulpit\ppa.pwn(9679) : error 017: undefined symbol "strrest"
C:\Documents and Settings\Administrator\Pulpit\ppa.pwn(9679) : error 033: array must be indexed (variable "BReason")
C:\Documents and Settings\Administrator\Pulpit\ppa.pwn(12879) : error 017: undefined symbol "strrest"
C:\Documents and Settings\Administrator\Pulpit\ppa.pwn(12879) : error 033: array must be indexed (variable "Reason")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-03-18, 20:11


Lukasbank







Wiek: 30
Na forum: 5329 dni
Posty: 249
Nick w MP: [USD]LuXoR[X]

Piwa: 404

Respekt: 136,5
Respekt: 136,5

wrzu?to gdzie? w mape
Kod:


strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}

new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-03-19, 10:01


szmon1234







Wiek: 27
Na forum: 5642 dni
Posty: 2
Nick w MP: Bl@dI.



Respekt: 50

[b]Lukasbank[/b], nic :/ nie da?o

[code]C:\Documents and Settings\Administrator\Pulpit\GRY\mapaaapp\ppzapis.pwn(1) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Pulpit\GRY\mapaaapp\ppzapis.pwn(9225) : error 017: undefined symbol "strrest"
C:\Documents and Settings\Administrator\Pulpit\GRY\mapaaapp\ppzapis.pwn(9225) : error 033: array must be indexed (variable "String")
C:\Documents and Settings\Administrator\Pulpit\GRY\mapaaapp\ppzapis.pwn(9679) : error 017: undefined symbol "strrest"
C:\Documents and Settings\Administrator\Pulpit\GRY\mapaaapp\ppzapis.pwn(9679) : error 033: array must be indexed (variable "BReason")
C:\Documents and Settings\Administrator\Pulpit\GRY\mapaaapp\ppzapis.pwn(12879) : error 017: undefined symbol "strrest"
C:\Documents and Settings\Administrator\Pulpit\GRY\mapaaapp\ppzapis.pwn(12879) : error 033: array must be indexed (variable "Reason")
C:\Documents and Settings\Administrator\Pulpit\GRY\mapaaapp\ppzapis.pwn(18309) : error 021: symbol already defined: "strtok"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


8 Errors.
[/code]

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-03-19, 10:46


Inferno

PAWNER






Wiek: 31
Na forum: 5680 dni
Posty: 196
Nick w MP: Inferno

Piwa: 8537

Respekt: 271,7
Respekt: 271,7Respekt: 271,7Respekt: 271,7

Pawn
strtok(const st_string[], &st_index) 
{ 
new length strlen(st_string); 
while ((st_index length) && (st_string[st_index] <= ' ')) 
{ 
st_index++; 
} 

new offset st_index; 
new result[20]; 
while ((st_index length) && (st_string[st_index] > ' ') && ((st_index offset) < (sizeof(result) - 1))) 
{ 
result[st_index offset] = st_string[st_index]; 
st_index++; 
} 
result[st_index offset] = EOS; 
return result; 
}


Podpis
NIE POMAGAM NA GG! NIE PISAĆ W TYCH SPRAWACH GDYŻ OD RAZU BLOKUJĘ
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-03-27, 10:14


Maxvell

d_b






Wiek: 26
Na forum: 4771 dni
Posty: 83
Nick w MP: Kotlet

Piwa: 270

Respekt: 65

Siema wywala mi errory, prosze o szybka pomoc

Kod:

C:\Users\PiTro003\Desktop\cos.pwn(4687) : error 017: undefined symbol "foreach"
C:\Users\PiTro003\Desktop\cos.pwn(4687) : error 029: invalid expression, assumed zero
C:\Users\PiTro003\Desktop\cos.pwn(4687) : warning 221: label name "i" shadows tag name
C:\Users\PiTro003\Desktop\cos.pwn(4687) : warning 215: expression has no effect
C:\Users\PiTro003\Desktop\cos.pwn(4687) : error 001: expected token: ";", but found ")"
C:\Users\PiTro003\Desktop\cos.pwn(4687) : 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.


a tutaj kod:

Pawn
 foreach(new iPlayer)
     {
         SetPVarInt(i"laser"0);
           SetPVarInt(i"color"18643);
     }


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-03-27, 15:21


mrx3667

mrdrifter






Wiek: 29
Na forum: 4533 dni
Posty: 143
Nick w MP: mrdrifter

Piwa: 359

Respekt: 377,8
Respekt: 377,8Respekt: 377,8Respekt: 377,8Respekt: 377,8

Rejmunt, nie masz biblioteki foreach, b?d? u?ywasz nieprawid?owej.

Podpis







GG: 3097129
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-03-27, 15:41


Maxvell

d_b






Wiek: 26
Na forum: 4771 dni
Posty: 83
Nick w MP: Kotlet

Piwa: 270

Respekt: 65

mrx3667, a sk?d mie? prawid?ow? lub j? zdoby?? dam piwo

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-03-27, 16:36


mrx3667

mrdrifter






Wiek: 29
Na forum: 4533 dni
Posty: 143
Nick w MP: mrdrifter

Piwa: 359

Respekt: 377,8
Respekt: 377,8Respekt: 377,8Respekt: 377,8Respekt: 377,8

Podpis







GG: 3097129
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-04-02, 21:14


awfesa







Wiek: 29
Na forum: 4705 dni
Posty: 563

Piwa: 223

Respekt: 280
Respekt: 280Respekt: 280Respekt: 280

mam problem bo w logach serwera ca?y czas wy?wietlaj? mi si? takie b??dy jak je mog? zlikwidowa? ?
Kod:

[20] [debug] Run time error 4: "Array index out of bounds"
[20] [debug] #0 0000f7b8 in public Pojazd (0x00000000) from privcar.amx
[20] [debug] AMX backtrace:
[20] [debug] Accessing element at negative index -400
[20] [debug] Run time error 4: "Array index out of bounds"
[20] [debug] #0 0000f7b8 in public Pojazd (0x00000000) from privcar.amx
[20] [debug] AMX backtrace:
[20] [debug] Accessing element at negative index -400
[20] [debug] Run time error 4: "Array index out of bounds"
[20] [debug] #0 0000f7b8 in public Pojazd (0x00000000) from privcar.amx
[20] [debug] AMX backtrace:
[20] [debug] Accessing element at negative index -400
[20] [debug] Run time error 4: "Array index out of bounds"
[20] [debug] #0 0000f7b8 in public Pojazd (0x00000000) from privcar.amx
[20] [debug] AMX backtrace:
[20] [debug] Accessing element at negative index -400


Podpis

Cokolwiek robicie w swoim życiu, nie będzie to legendarne,
jeżeli wasi przyjaciele nie będą mogli tego zobaczyć.
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