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

Wysłany: 2009-08-06, 12:44


Ddobry







Wiek: 32
Na forum: 6795 dni
Posty: 15

Piwa: 93

Respekt: 50

Witam doda?em wszystko z /wejdz i /wyjdz pod klawisz sprintu i wyskoczy?y mi takie errory..

Kod:


Jak ich tam nie w?ozy?em to nie by?o erroru ?e ten "string" nie by? zdefiniowany, dlaczego? :arrow: :piwo:

Podpis
Pomogłem? Wciśnij [/b]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-06, 14:49


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 | .
Ddobry, dodaj nad t? linijk? new string[256]; ...

Podpis

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

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-06, 18:21


Pelo

Streetball is My Job






Wiek: 32
Na forum: 6567 dni
Posty: 32

Piwa: 124

Respekt: 27,3

Ostrzeżeń: 80%
G?ra mapy/skryptu:
Kod:

Kod:


new WarnSystem[200];


Komenda:
Kod:



if(strcmp(cmd, "/warn", true)==0 && IsPlayerAdmin(playerid))
{
new idstr[256];
idstr = strtok(cmdtext, idx);
if(!strlen(idstr))return SendClientMessage(playerid, COLOR_GREY ,"*** U?ywaj : /warn id pow?d");
new id = strval(idstr);
if(id < 0 || id > 200)return SendClientMessage(playerid, COLOR_GREY ,"*** U?ywaj : /warn id pow?d");
new powod[256];
powod = strrest(cmdtext, idx);
if(!strlen(powod))return SendClientMessage(playerid, COLOR_GREY ,"*** U?ywaj : /warn id pow?d");
if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLOR_GREY ,"*** Taki gracz nie jest online..");
WarnSystem[id]++;
new str[256];
format(str, 256, "*** Gracz %s otrzyma? ostrze?enie od Admina %s. Jest to %d z 3 ostrze?en.", PlayerName(id), PlayerName(playerid), WarnSystem[id]);
SendClientMessageToAll(COLOR_LIGHTRED, str);
format(str, 256, "*** Pow?d: %s.", powod);
SendClientMessageToAll(COLOR_LIGHTRED, str);
if(WarnSystem[id]==3){
format(str, 256, "*** Gracz %s zosta? wyrzucony przez SERVER. Powod: Uzyska? maksymaln? liczbe ostrze?en.", PlayerName(id));
SendClientMessageToAll(COLOR_LIGHTRED, str);
Kick(id);
}
return 1;
}

Na dole mapy/skryptu:

Kod:


strrest(const string[], index)
{
new length = strlen(string),offset = index,result[256];
while ((index < length) && ((index - offset) < (sizeof(result) - 1)) && (string[index] > '\r'))
{
result[index - offset] = string[index];index++;
}
result[index - offset] = EOS;
return result;
}


Errory i Warning:
Kod:


(2044) : error 017: undefined symbol "PlayerName"
(2049) : error 017: undefined symbol "PlayerName"
(2876) : warning 219: local variable "PlayerName" shadows a variable at a preceding level


Podpis


Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-06, 18:30


xqz

otaku desu!






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

Piwa: 5465

Respekt: 418,6
Respekt: 418,6

usun linijke:

2876


I pod new str[256]; daj:

Kod:

new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(strval(idstr), PlayerName, sizeof(PlayerName));




@DOWN

?oooooo.. Nie zauwazylem, ze sa 2 PlayerName's x]

Ostatnio zmieniony przez xqz 2009-08-06, 19:24, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-06, 18:35


Pelo

Streetball is My Job






Wiek: 32
Na forum: 6567 dni
Posty: 32

Piwa: 124

Respekt: 27,3

Ostrzeżeń: 80%
Kod:

(2046) : error 012: invalid function call, not a valid address
(2046) : warning 215: expression has no effect
(2046) : error 001: expected token: ";", but found ")"
(2046) : error 029: invalid expression, assumed zero
(2046) : fatal error 107: too many error messages on one line


Kod:

format(str, 256, "*** Gracz %s otrzyma? ostrze?enie od Admina %s. Jest to %d z 3 ostrze?en.", PlayerName(id), PlayerName(playerid), WarnSystem[id]);


Podpis


Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-06, 18:42


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 | .
xqz, po co tak ?
Pelo,
http://gtaonline.pl/viewtopic.php?t=11062 tu znajdziesz funkcj? PlayerName, wklej j? do mapy...

Podpis

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

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-06, 18:50


Pelo

Streetball is My Job






Wiek: 32
Na forum: 6567 dni
Posty: 32

Piwa: 124

Respekt: 27,3

Ostrzeżeń: 80%
The Psychol, dzia?a, masz :piwo:

Jeszcze mam pytanie bo wyskoczy? mi warning:
Kod:

(2876) : warning 219: local variable "PlayerName" shadows a variable at a preceding level


Je?li usune t? linijke to wyskakuje:
Kod:

(2883) : error 076: syntax error in the expression, or invalid function call
(2884) : error 076: syntax error in the expression, or invalid function call


Czy da?oby si? to jako? usun?? ?

CMD:
Kod:

if(strcmp(cmd, "/admins", true) == 0)


{
new PlayerName[24];
new count = 0;
SendClientMessage(playerid, 0xFFFF00AA, "Administratorzy:");
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsPlayerAdmin(i))
{
GetPlayerName(i,PlayerName,24);
format(string,sizeof(string),"%s jest obecnie online.", PlayerName);
SendClientMessage(playerid, 0xFFFFFFAA, string);
count++;
}
}
if(count == 0)
{
SendClientMessage(playerid, 0xFFFFFFAA, "Nie ma teraz ?adnego admina na serwerze.");
}
return 1;
}



@DOWN
PlayerName2 :p


Podpis


Ostatnio zmieniony przez Pelo 2009-08-06, 19:04, w całości zmieniany 2 razy  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-06, 18:58


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:

if(strcmp(cmd, "/admins", true) == 0)
{
new PlayerName2[24];
new count = 0;
SendClientMessage(playerid, 0xFFFF00AA, "Administratorzy:");
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsPlayerAdmin(i))
{
GetPlayerName(i,PlayerName2,24);
format(string,sizeof(string),"%s jest obecnie online.", PlayerName2);
SendClientMessage(playerid, 0xFFFFFFAA, string);
count++;
}
}
if(count == 0)
{
SendClientMessage(playerid, 0xFFFFFFAA, "Nie ma teraz ?adnego admina na serwerze.");
}
return 1;
}


Przyjrzyj si? temu co poprawi?em ;)

Podpis

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

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-11, 08:20


uranosqq@yo213







Wiek: 29
Na forum: 6456 dni
Posty: 7
Nick w MP: UraN27

Piwa: 11

Respekt: 35,3

Witam mam errory, oto one.

Kod:

(164) : error 017: undefined symbol "str"
(164) : error 017: undefined symbol "str"
(164) : error 029: invalid expression, assumed zero
(164) : fatal error 107: too many error messages on one line


Linijka 164:
Kod:

format(str, sizeof(str), "___~w~Do konca meczu pozostalo: %02d:%02d", MinutyDoKonca, SekundyDoKonca);


Ca?y kod:
Kod:

format(str, sizeof(str), "___~w~Do konca meczu pozostalo: %02d:%02d", MinutyDoKonca, SekundyDoKonca);
CountText = Text:TextDrawCreate(325.0, 320.0, str);
TextDrawColor(CountText, 0xFFFFFFFF);
TextDrawFont(CountText, 1);
TextDrawLetterSize(CountText, 0.3, 1.3);
TextDrawSetShadow(CountText, 3);
TextDrawSetOutline(CountText, 1);


Podpis
GTA V


"Nie ma złego pokoju jak i nie ma dobrej wojny" - Winston Churchill
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-11, 10:07


DestiX

Miszczu PAWNO :D






Wiek: 31
Na forum: 6637 dni
Posty: 79
Nick w MP: DestiX

Piwa: 3473

Respekt: 50

hmm moze brak include ??

Podpis

Jestem jaki jestem, ale wiem że jestem...
Zakończyć przygodę poraz ostatni... > http://www.destix.pl/?p=30
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-11, 10:15


Michalec

Dokładnie.






Wiek: 30
Na forum: 6502 dni
Posty: 163
Nick w MP: []Damianos[]

Piwa: 99

Respekt: 86,6

Jakiego include ? :P To normalny b??d :P Nad tym napisz new str[100] i po sprawie

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-11, 14:09


marcin5033







Wiek: 30
Na forum: 6452 dni
Posty: 6

Piwa: 1

Respekt: 50

kto by mogl mi naprawic mapke
Kod:

C:\Documents and Settings\Listopadzki\Pulpit\All foldery\mody gta\pawno\include\dutils.inc(298) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Documents and Settings\Listopadzki\Pulpit\All foldery\mody gta\pawno\include\dutils.inc(299) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Documents and Settings\Listopadzki\Pulpit\All foldery\mody gta\pawno\include\dutils.inc(318) : warning 219: local variable "count" shadows a variable at a preceding level
C:\Documents and Settings\Listopadzki\Pulpit\All foldery\mody gta\pawno\include\dutils.inc(337) : warning 219: local variable "count" shadows a variable at a preceding level
C:\Documents and Settings\Listopadzki\Pulpit\All foldery\mody gta\pawno\include\dutils.inc(355) : warning 219: local variable "count" shadows a variable at a preceding level
C:\Documents and Settings\Listopadzki\Pulpit\All foldery\mody gta\pawno\include\dutils.inc(356) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Documents and Settings\Listopadzki\Pulpit\All foldery\mody gta\pawno\include\dutils.inc(443) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Documents and Settings\Listopadzki\Pulpit\All foldery\mody gta\pawno\include\dudb.inc(61) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(796) : warning 219: local variable "X" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(796) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(796) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(818) : warning 219: local variable "playername" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(831) : warning 219: local variable "i" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(843) : warning 219: local variable "i" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(864) : warning 219: local variable "i" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(892) : warning 219: local variable "i" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(895) : warning 219: local variable "i" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(913) : warning 219: local variable "i" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(930) : warning 219: local variable "i" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(974) : warning 219: local variable "i" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(992) : warning 219: local variable "amount" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(994) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(1049) : warning 219: local variable "i" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(1050) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(1073) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(1088) : error 017: undefined symbol "playername"
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(1088) : error 017: undefined symbol "playername"
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(1088) : error 029: invalid expression, assumed zero
C:\DOCUME~1\LISTOP~1\Pulpit\ALLFOL~1\MODYGT~1\Mietek.pwn(1088) : fatal error 107: too many error messages on one line

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


5 Errors.
jest to 5 bledow bylo 12 tylko naprawilem a reszty naprawic nieumiem pls |-|ELP bedzie piffko za ||-||ELP

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-11, 18:32


KarolEk







Wiek: 36
Na forum: 6698 dni
Posty: 3

Piwa: 3

Respekt: 50

Mam takie errory.
Kod:


C:\DOCUME~1\Mati\Pulpit\FORTCA~1\GAMEMO~1\gf.pwn(2705) : warning 202: number of arguments does not match definition
C:\DOCUME~1\Mati\Pulpit\FORTCA~1\GAMEMO~1\gf.pwn(2849) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Mati\Pulpit\FORTCA~1\GAMEMO~1\gf.pwn(2849) : error 004: function "GateClose" is not implemented
C:\DOCUME~1\Mati\Pulpit\FORTCA~1\GAMEMO~1\gf.pwn(2856) : warning 225: unreachable code
C:\DOCUME~1\Mati\Pulpit\FORTCA~1\GAMEMO~1\gf.pwn(2856) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Mati\Pulpit\FORTCA~1\GAMEMO~1\gf.pwn(2856) : error 004: function "GateClose2" is not implemented
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Linijka 2856:
Kod:

public GateClose2(playerid)

linijka 2849:
Kod:

public GateClose(playerid)

Linijka 2705:
Kod:

OnPlayerUpdate();


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-12, 14:53


oski535

Miszczu RP






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

Piwa: 2

Respekt: 50

Ostrzeżeń: 20%
Kolejny b??d :p ;)

D:\?ci?gania\obiekty.pwn(206) : error 001: expected token: "}", but found "-identifier-"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Linijka:

205 {14595, 2483.9143, -170.2366, 4610.2222, 0, 0, 180} //posterunek policji
206 CreateObject{14595, 2483.9143, -170.2366, 4610.2222, 0, 0, 180};
207 CreateObject(16649, 2468.5994, -159.0303, 4607.6133, 0, 0, 180);
208 CreateObject(2395, 2475.532, -159.9551, 4608.6802, 88.5219, 2.5783, 90.0773);

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

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

 
Wysłany: 2009-08-12, 15:18


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 | .
206 CreateObject{14595, 2483.9143, -170.2366, 4610.2222, 0, 0, 180);

Podpis

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

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