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

Wysłany: 2009-06-30, 15:31


Pawno_Maniak







Wiek: 29
Na forum: 6530 dni
Posty: 2

Piwa: 85

Respekt: 50

Ja mam takie co to oznacza?

error 052: multi-dimensional arrays must be fully initialized

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-06-30, 21:37


xqz

otaku desu!






Wiek: 32
Na forum: 6503 dni
Posty: 723
Nick w MP: xqz

Piwa: 5465

Respekt: 418,6
Respekt: 418,6

Pawno_Maniak, pokaz linijke.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-02, 01:46


The Psychol

Psychol






Wiek: 35
Na forum: 6871 dni
Posty: 2822
Nick w MP: The_Psychol

Piwa: 4390

Respekt: 324
Respekt: 324Respekt: 324Respekt: 324


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
Kod:

(1503)if (strval(strtok(tmp, idx, ',')) == 1){
(1504)KickMsg(playerid, "Blacklist", strtok(tmp, idx, ','));
(1505)idx = 0;}
(1506)if (strval(strtok(tmp, idx, ',')) == 2){
(1507)BanMsg(playerid, "Blacklist", strtok(tmp, idx, ','));}}


Kod:

(1503) : warning 202: number of arguments does not match definition
(1504) : warning 202: number of arguments does not match definition
(1506) : warning 202: number of arguments does not match definition
(1507) : warning 202: number of arguments does not match definition


Wszystko przez wgranie nowych includ?w, jest p??no (wcze?nie) m?j m?zg nie pracuje jak trzeba, prosz? o pomoc O_o

Podpis

And that's the bottom line 'cause The Psychol said so!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-02, 02:44


Fire Dragon

c=(b/n)%10+48,n/=10;






Wiek: 32
Na forum: 7104 dni
Posty: 63

Piwa: 1046

Respekt: 50

Kod:

stock strtok(const str[],&i,const s=' ')
{
new len=strlen(str);while((i<len)&&(str[i]<=s))i++;new res[128],o=i;
while((i<len)&&(str[i]>s)&&((i-o)<127))res[i-o]=str[i],i++;res[i-o]=EOS;return res;
}



U?yj tego strtoka ;)

Podpis
Bardzo chętnie pomagam na GG...
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-02, 02:52


The Psychol

Psychol






Wiek: 35
Na forum: 6871 dni
Posty: 2822
Nick w MP: The_Psychol

Piwa: 4390

Respekt: 324
Respekt: 324Respekt: 324Respekt: 324


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
Dzi?ki ;]
Je?eli dobrze zauwazy?em, teraz nie musze definiowa? stringu, tam gdzie u?ywany jest strtok? (tzn mia?em komend? kick, w niej new string[256]; by? warning 219, skasowa?em to, i warning znikn?? :P )

Podpis

And that's the bottom line 'cause The Psychol said so!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-02, 03:00


Fire Dragon

c=(b/n)%10+48,n/=10;






Wiek: 32
Na forum: 7104 dni
Posty: 63

Piwa: 1046

Respekt: 50

Nie no musisz... Przecie? nowy string jest dopiero odpowiednio sformatowany przez strtoka np.

Kod:

new tmp[128];
tmp = strtok(cmdtext,idx);


BTW. U?ywanie tablicy + strtoka + zwyk?ego systemu komend to straszliwa strata pami?ci. Dcmd + Sscanf ;)

Podpis
Bardzo chętnie pomagam na GG...
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-02, 15:08


oski535

Miszczu RP






Wiek: 31
Na forum: 6643 dni
Posty: 19
Nick w MP: ExTreme

Piwa: 2

Respekt: 50

Ostrzeżeń: 20%
Mam b??d neimoge zrobi? maki na amx

D:\?ci?gania\serwer.pwn(27568) : error 021: symbol already defined: "PlayerToPoint"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Linijka:
http://img194.imageshack..../bladnagtao.png

Podpis
Lubie dżem :eye: [/url]
[color=red]

Nick RP: Steve_McLouis
Nick DM=Escape
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-02, 15:11


AdiX







Wiek: 31
Na forum: 6898 dni
Posty: 100

Piwa: 932

Respekt: 50

Skasuj ca?y ten public.

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-05, 16:15


Czaja123







Wiek: 30
Na forum: 6383 dni
Posty: 6

Piwa: 626

Respekt: 50

Ostrzeżeń: 100%
Kod:

C:\Documents and Settings\UserX\Pulpit\Nowy folder (14)\Nowy folder (4)\Mapa.pwn(1117) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\UserX\Pulpit\Nowy folder (14)\Nowy folder (4)\Mapa.pwn(1119) : error 047: array sizes do not match, or destination array is too small


Tutaj kod kt?ry to powoduje
Kod:

tmp = dini_Get(FILE_SETTINGS, "register");
if (strval(tmp) == 0) {SendClientMessage(playerid, CINFO, "* Ju? nie mo?na sie rejestrowa?!");return 1;
}tmp = strtok(cmdtext, idx);GetPlayerName(playerid, playernamesizeof(playername));if(25 < strlen(tmp) || strlen(tmp) < 3) {

Kto wspomo?e :) ?
Za pomoc :piwo:

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-06, 17:51


lonley







Wiek: 33
Na forum: 6345 dni
Posty: 5

Piwa: 1

Respekt: 50

Chcia?em sobie zrobi? komend? /createvehicle [ID POJAZDU]
Kompiluje si?, ale gdy wpisz? t? komend? na serwerze to wywala mi gta.
Co robi? ?le, jak powinien wygl?da? kod?

Oto kod:
Kod:

if(strcmp(cmd, "/createvehicle", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new Float:x, Float:y, Float:z;
new tmp[256];
tmp = strtok(cmdtext, idx);
new modelid;
modelid = ReturnUser(tmp);
GetPlayerPos(playerid, Float:x, Float:y, Float:z);

CreateVehicle(modelid, Float:x+5, Float:y, Float:z, 82.2873, 0, 1, 800);
}
return 1;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-06, 20:50


The Reary







Wiek: 47
Na forum: 6470 dni
Posty: 69
Nick w MP: TheReary

Piwa: 2446

Respekt: 57

Mistrzu_PL, Zaduzo obiektow w mapie? Mo?e masz jakis skrypt co ma np. 200 obiectow , to bedzie crashowac .

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-07, 12:57


Dominik1522







Wiek: 31
Na forum: 6449 dni
Posty: 19

Piwa: 402

Respekt: 45,3

Ostrzeżeń: 40%
Witam robi? checkpointa i mam troch? error?w :

C:\Documents and Settings\Dominik\Pulpit\lvdm2.pwn(139) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Dominik\Pulpit\lvdm2.pwn(139) : warning 215: expression has no effect
C:\Documents and Settings\Dominik\Pulpit\lvdm2.pwn(1375) : error 010: invalid function or declaration
C:\Documents and Settings\Dominik\Pulpit\lvdm2.pwn(1376) : error 001: expected token: "-identifier-", but found "-integer value-"
C:\Documents and Settings\Dominik\Pulpit\lvdm2.pwn(1379) : error 010: invalid function or declaration
C:\Documents and Settings\Dominik\Pulpit\lvdm2.pwn(1390) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.


Linijki

139: 24/7(playerid);
1375 forward 24/7(playerid);
1376 public 24/7(playerid)
1378 SetPlayerCheckpoint(playerid, -22.2591,-55.5929,1003.5469,5);
1379 if(PlayerToPoint(5,playerid, -22.2591,-55.5929,1003.5469)) // wsp??rz?dne wy?ej i tu maj? by? takie same
1390 return 1;
}

Prosz? o pomoc. :( :(

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-07, 17:30


lonley







Wiek: 33
Na forum: 6345 dni
Posty: 5

Piwa: 1

Respekt: 50

Kod:


if(strcmp(cmd, "/pojazdspawn", true) == 0 ){
new Float:x, Float:y, Float:z;
new carid;
new tmp[256], idx;
tmp = strtok(cmdtext, idx);


carid = strval(tmp);
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
CreateVehicle(carid, Float:x+3, Float:y, Float:z, 90, 4, 4, 9999);

return 1;
}


Kod:

E:\GTASAM~1\PAWNO\SERWER\GAMEMO~1\ls.pwn(372) : warning 219: local variable "idx" shadows a variable at a preceding level

Ta linia 372 to w tym wypadku jest czwarta, czyli to "new tmp[256], idx;". Prosz? o pomoc.

Edit, ju? rozumiem.
"new tmp[256], idx;" - Stworzy?em tablic? tmp oraz zmienn? idx. Gdy usun??em t? linijk? to tmp by?o nie znane, nie zadeklarowane, a gdy by?a ta linijka, to znowu nie potrzebne by?o u?yte idx (Symbol is never used)
Ju? rozumiem, post do usuni?cia. :)

Edit2: Tylko musz? jeszcze zrobi? to "if(!strlen(tmp))", bo gdy po komendzie nie wpisz? id wozu to dostan? crasha.

Edit3: Ostatecznie tak wygl?da kod. Dzia?a.
Kod:

if(strcmp(cmd, "/pojazd spawn", true) == 0 ){
new Float:x, Float:y, Float:z;
new carid;
new tmp[256];
tmp = strtok(cmdtext, idx);

if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "*Wpisz: /pojazd spawn [id pojazdu]");
return 1;
}

tmp = strtok(cmdtext, idx);
carid = strval(tmp);
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
CreateVehicle(carid, Float:x+3, Float:y, Float:z, 90, 4, 4, 9999);

return 1;
}


Ostatnio zmieniony przez lonley 2009-07-07, 17:54, w całości zmieniany 3 razy  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-07, 17:42


Fire Dragon

c=(b/n)%10+48,n/=10;






Wiek: 32
Na forum: 7104 dni
Posty: 63

Piwa: 1046

Respekt: 50

Kod:

if(strcmp(cmd, "/pojazdspawn", true) == 0 ){
new Float:x, Float:y, Float:z;
new carid;
new tmp[128];
tmp = strtok(cmdtext, idx);


carid = strval(tmp);
GetPlayerPos(playerid, x, y, z);
CreateVehicle(carid, x+3, y, z, 90, 4, 4, 9999);

return 1;
}


Podpis
Bardzo chętnie pomagam na GG...
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-07, 20:15


H2S04







Wiek: 31
Na forum: 6457 dni
Posty: 5



Respekt: 50

Prosz? o pomoc bo nie daje rady do 3h :/

Kod:


C:\Documents and Settings\Administrator\Pulpit\Pawe?\PAWNO\PAWNO\samp02Xserver.win32\pawno\Baza adma.pwn(101) : warning 202: number of arguments does not match definition

C:\Documents and Settings\Administrator\Pulpit\Pawe?\PAWNO\PAWNO\samp02Xserver.win32\pawno\Baza adma.pwn(109) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.


Oto linijki

Kod:



public OnPlayerCommandText(playerid, cmdtext[])

{


// komenda otwieraj?ca bram?
if (strcmp(cmdtext, "/brama.otworz", true)== 0 && IsPlayerAdmin(playerid)) {
MoveObject(brama,1889.5026, 1104.3534, 18.1014, 2);
GameTextForPlayer(playerid, "~g~Brama zostala otwarta!", 3000, 1);
SendClientMessage(playerid, 0x007700FF, "Otwierasz bram?.");
return 1;
}

// komenda zamykaj?ca bram?
if (strcmp(cmdtext, "/brama.zamknij", true)== 0 && IsPlayerAdmin(playerid)) {
MoveObject(brama,1889.478, 1104.3469, 12.5231, 2);
GameTextForPlayer(playerid, "~g~Brama zosta?a zamkni?ta!", 3000, 1);
SendClientMessage(playerid, 0x007700FF, "Zamykasz bram?");
return 1;
}


VVVVVVVVVVVVVVVVVVVVV to te na dole VVVVVVVVVVVVVVVVVVVVV

// komenda dzi?ki kt?rej winda jedzie w g?re
if (strcmp(cmdtext, "/winda.gora", true)== 0 && IsPlayerAdmin(playerid)) {
MoveObject(winda,1871.7419, 1178.967, 17.0699, 269.7591, 2);
GameTextForPlayer(playerid, "~g~Brama zostala otwarta!", 3000, 1);
SendClientMessage(playerid, 0x007700FF, "Otwierasz bram?.");
return 1;
}

// komenda dzi?ki kt?rej winda jedzie w d??
if (strcmp(cmdtext, "/winda.do?", true)== 0 && IsPlayerAdmin(playerid)) {
MoveObject(winda,1871.7244, 1178.9111, 9.8703, 269.7591, 2);
GameTextForPlayer(playerid, "~g~Brama zosta?a zamkni?ta!", 3000, 1);
SendClientMessage(playerid, 0x007700FF, "Zamykasz bram?");
return 1;
}
return 0;
}





Edit:

Pomo?e kto? ? :(

Podpis
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