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

Wysłany: 2012-04-14, 20:49


HunterS

Pff..






Wiek: 29
Na forum: 5164 dni
Posty: 11
Nick w MP: _Sonix[HA]

Piwa: 4

Respekt: 50

Ostrzeżeń: 40%
Witajcie mam taki problem :<

Kod:

D:\Gry\GTA\serwer\pawno4\gamemodes\Mapa_PSLv1.0.pwn(541) : error 017: undefined symbol "strrest"
D:\Gry\GTA\serwer\pawno4\gamemodes\Mapa_PSLv1.0.pwn(541) : error 033: array must be indexed (variable "msg")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.



Pom??cie rozwi?za? ;]

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-14, 20:51


arkopi







Wiek: 31
Na forum: 5579 dni
Posty: 177

Piwa: 60

Respekt: 50

Ostrzeżeń: 20%
podaj linijke 541

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-15, 00:04


HunterS

Pff..






Wiek: 29
Na forum: 5164 dni
Posty: 11
Nick w MP: _Sonix[HA]

Piwa: 4

Respekt: 50

Ostrzeżeń: 40%
Kod:

if(strcmp(cmd, "/announce", true) == 0 && IsPlayerAdmin(playerid)) {
new msg[256];
new tmp1[256];
new tmp2[256];
tmp1 = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
msg = strrest(cmdtext,idx);
new seconds = strval(tmp1);
new styl = strval(tmp2);
if(!IsPlayerAdmin(playerid)) return 1;
//if(styl == 2) return SendClientMessage(playerid, COLOR_LIGHTGREEN,"***");
if(seconds == 0)
{
SendClientMessage(playerid, COLOR_LIGHTGREEN,"*** WPISZ: /announce [czas] [styl 1-6] [text]***");
return 1;
}
new tmp[256];
format(tmp,sizeof(tmp),"~w~%s",msg);
seconds = seconds * 1000;
GameTextForAll(tmp,seconds,styl);
return 1;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-15, 08:37


dawid!!!!







Wiek: 29
Na forum: 5229 dni
Posty: 1
Nick w MP: dawid-pl

Piwa: 1

Respekt: 50

Ostrzeżeń: 20%
masz
Kod:


if(strcmp(cmd, "/announce", true) == 0 && IsPlayerAdmin(playerid)) {
new msg[256];
new tmp1[256];
new tmp2[256];
new seconds = strval(tmp1);
new styl = strval(tmp2);
if(!IsPlayerAdmin(playerid)) return 1;
//if(styl == 2) return SendClientMessage(playerid, COLOR_LIGHTGREEN,"***");
if(seconds == 0)
{
SendClientMessage(playerid, COLOR_LIGHTGREEN,"*** WPISZ: /announce [czas] [styl 1-6] [text]***");
return 1;
}
new tmp[256];
format(tmp,sizeof(tmp),"~w~%s",msg);
seconds = seconds * 1000;
GameTextForAll(tmp,seconds,styl);
return 1;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-16, 18:44


=MaD=







Wiek: 37
Na forum: 5303 dni
Posty: 61
Nick w MP: FasoL

Piwa: 136

Respekt: 45,3

Errory:
Kod:

C:\Documents and Settings\DOM\Pulpit\CityTruck\CityTruck.pwn(26) : error 017: undefined symbol "SetPlayerClass"
C:\Documents and Settings\DOM\Pulpit\CityTruck\CityTruck.pwn(62) : warning 209: function "OnPlayerRequestClass" should return a value
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase




Tutaj s? te 2 errory
Pawn

public OnPlayerRequestClass(playeridclassid)
{

SetPlayerClass(playeridclassid)
{
if(classid == 0)
{
PrzydzielDoLSPD(playerid);
gTeam[playerid] = TEAM_POLICE;
}
else if(classid == 1)
{
PrzydzielDoLSMC(playerid);
gTeam[playerid] = TEAM_MEDIC;
}
}

switch (classid)
                 {

 case 0:
 {

    GameTextForPlayer(playerid"~g~~h~Policja"5006);

}
case 1:
{
GameTextForPlayer(playerid"~g~~h~Pogotowie"5006);

if(gTeam[playerid] == TEAM_POLICE && wpolice[playerid] == 1){
return 1;
}
else if(gTeam[playerid] == TEAM_POLICE && wpolice[playerid] != 1){
return 0;
            }
        }
    
    }
}


Za pomoc daj? piffka ;]

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-16, 18:56


BraYaN_







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

Piwa: 1614

Respekt: 63

=MaD=, tu znajdziesz definicj? SetPlayerClass > gtao.pl/-podstawy-tdma-vt23206.htm
w twoim kodzie przed ostatni? klamr? zamykaj?c? dodaj
Kod:

return 1;


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-16, 19:42


=MaD=







Wiek: 37
Na forum: 5303 dni
Posty: 61
Nick w MP: FasoL

Piwa: 136

Respekt: 45,3

Jak wklei?em te ''return 1;'' To teraz pokazuje mi si? :
Kod:

C:\Documents and Settings\DOM\Pulpit\CityTruck\CityTruck.pwn(62) : warning 217: loose indentation


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-16, 19:49


DumpeR







Wiek: 30
Na forum: 5330 dni
Posty: 171
Nick w MP: dumpeer

Piwa: 1026

Respekt: 48,3

"=MaD=" napisał/a:

Jak wklei?em te ''return 1;'' To teraz pokazuje mi si? :
Kod:

C:\Documents and Settings\DOM\Pulpit\CityTruck\CityTruck.pwn(62) : warning 217: loose indentation

?le j? u?o?y?e?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-16, 19:49


BraYaN_







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

Piwa: 1614

Respekt: 63

=MaD=, z?e u?o?enie kodu. Mo?esz wklei?
Kod:

#pragma tabsize 0
na g?r? GameMod'u, lecz lepiej u?o?y? kod.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-16, 20:50


=MaD=







Wiek: 37
Na forum: 5303 dni
Posty: 61
Nick w MP: FasoL

Piwa: 136

Respekt: 45,3

Macie jakie? wskaz?wki jak poprawnie u?o?y? kod ?

[ Dodano: 2012-04-16, 20:51 ]
Teraz zosta? mi tylko 1 warning :
Kod:


C:\Documents and Settings\DOM\Pulpit\CityTruck\CityTruck.pwn(26) : error 017: undefined symbol "SetPlayerClass"


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-16, 21:18


BraYaN_







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

Piwa: 1614

Respekt: 63

=MaD=, http://gtao.pl/-jak-popra...cie-vt21193.htm
co do error'u to poda?em Ci ju? wy?ej rozwi?zanie.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-16, 21:22


DumpeR







Wiek: 30
Na forum: 5330 dni
Posty: 171
Nick w MP: dumpeer

Piwa: 1026

Respekt: 48,3

Uk?adanie np.

http://pastebin.com/GvELM2ER

A "return 1;" powinien by? pod funkcj?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-16, 21:39


=MaD=







Wiek: 37
Na forum: 5303 dni
Posty: 61
Nick w MP: FasoL

Piwa: 136

Respekt: 45,3

Kod:

SetPlayerClass(playerid, classid)
{
if(classid == 0)
{
PrzydzielDoLSPD(playerid);
gTeam[playerid] = TEAM_POLICE;
}
else if(classid == 1)
{
PrzydzielDoLSMC(playerid);
gTeam[playerid] = TEAM_MEDIC;
}

Ci?gle mam ten b??d, nic nie mog? na niego zaradzi?. Czyta?em tamten poradnik lecz nic nie da?o:
Kod:

C:\Documents and Settings\DOM\Pulpit\CityTruck\CityTruck.pwn(28) : error 017: undefined symbol "SetPlayerClass"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-21, 11:50


Logitech12







Wiek: 31
Na forum: 5346 dni
Posty: 5
Nick w MP: [_Logitech_]



Respekt: 50

C:\Users\Home\Desktop\Gry\SAMP\pawno\include\strtok.inc(8) : error 017: undefined symbol "strlen"
C:\Users\Home\Desktop\Gry\SAMP\pawno\include\strtok.inc(8) : warning 215: expression has no effect
C:\Users\Home\Desktop\Gry\SAMP\pawno\include\strtok.inc(8) : error 001: expected token: ";", but found ")"
C:\Users\Home\Desktop\Gry\SAMP\pawno\include\strtok.inc(8) : error 029: invalid expression, assumed zero
C:\Users\Home\Desktop\Gry\SAMP\pawno\include\strtok.inc(8) : 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.

kto pomo?e ??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-04-21, 13:45


GaCeL







Wiek: 33
Na forum: 5593 dni
Posty: 197
Nick w MP: GaCeL

Piwa: 96

Respekt: 45,3

C:\Documents and Settings\User\Pulpit\Pawno\include\strtok.inc(6) : error 025: function heading differs from prototype
C:\Documents and Settings\User\Pulpit\Pawno\include\strtok.inc(7) : error 021: symbol already defined: "strtok"
C:\Documents and Settings\User\Pulpit\Pawno\include\strtok.inc(22) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
Mapa PP HELP

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