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

Wysłany: 2009-07-31, 14:13


xqz

otaku desu!






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

Piwa: 5465

Respekt: 418,6
Respekt: 418,6

mlodzik12, nie zamknales publica/komendy.

postaw tam gdzie pokazuje error: return 1;}

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-31, 16:28


kaminiak

Były Head Admin Psr24.pl






Wiek: 33
Na forum: 6388 dni
Posty: 46
Nick w MP: [PSR]Kaminiak

Piwa: 47

Respekt: 50

Ostrzeżeń: 20%
Kod:

(3999) : error 004: function "bronwojsko" is not implemented

Kod:

(6733) : warning 235: public function lacks forward declaration (symbol "bronwojskot")

Linijka 3999:
Kod:


bronwojsko(playerid);

Linijka 6733 (i w pobli?u):
Kod:

forward bronwojsko(playerid);
public bronwojskot(playerid)
{
GivePlayerWeapon(playerid,35,15);
return 1;
}


Podpis
www.Psr24.pl

91.204.163.105:9390
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-31, 17:26


xqz

otaku desu!






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

Piwa: 5465

Respekt: 418,6
Respekt: 418,6

"kaminiak" napisał/a:

skot
blad w publicu zrobiles. Popraw go i bedzie ok.

Czyli:
Kod:


forward bronwojsko(playerid);
public bronwojsko(playerid)
{
GivePlayerWeapon(playerid,35,15);
return 1;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-31, 21:57


kaminiak

Były Head Admin Psr24.pl






Wiek: 33
Na forum: 6388 dni
Posty: 46
Nick w MP: [PSR]Kaminiak

Piwa: 47

Respekt: 50

Ostrzeżeń: 20%
Kod:

(9025) : warning 225: unreachable code


LINIJKA 9025:
Kod:

new NO;


Pozdrawiam :)

Podpis
www.Psr24.pl

91.204.163.105:9390
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-07-31, 22:57


xqz

otaku desu!






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

Piwa: 5465

Respekt: 418,6
Respekt: 418,6

kaminiak, pokaz dla jakiego kodu ma byc ten new.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-01, 09:44


kaminiak

Były Head Admin Psr24.pl






Wiek: 33
Na forum: 6388 dni
Posty: 46
Nick w MP: [PSR]Kaminiak

Piwa: 47

Respekt: 50

Ostrzeżeń: 20%
Kod:

new NO;
if(!NO){
new censo[256];
set(censo, text);
for(new y=0;y<strlen(censo);y++)censo[y] = tolower(censo[y]);
for(new g2=0;g2<64;g2++){
censo = strreplace(",","",censo);
}
new offset = 0, i2 = 0, lastletter, len = strlen(censo);
for(i2 = 0; i2 < len; i2++)
{
new tmpoffset = i2-offset;
if(i2 != 0 && lastletter == censo[i2]) offset++;
else {
censo[tmpoffset] = censo[i2];
lastletter = censo[i2];
}
}
censo[i2-offset] = '\0';


Podpis
www.Psr24.pl

91.204.163.105:9390
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-01, 12:05


xqz

otaku desu!






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

Piwa: 5465

Respekt: 418,6
Respekt: 418,6

kaminiak,

zamiast:

Kod:

new NO;


daj

Kod:

new NO[MAX_PLAYERS];


Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-01, 19:07


kaminiak

Były Head Admin Psr24.pl






Wiek: 33
Na forum: 6388 dni
Posty: 46
Nick w MP: [PSR]Kaminiak

Piwa: 47

Respekt: 50

Ostrzeżeń: 20%
Kod:

(9025) : warning 225: unreachable code
(9026) : error 033: array must be indexed (variable "NO")


Linijka 9025 i 9026:
Kod:

new NO[MAX_PLAYERS];
if(!NO){

Pozdrawiam

[ Dodano: 2009-08-02, 01:52 ]

Podpis
www.Psr24.pl

91.204.163.105:9390
Ostatnio zmieniony przez kaminiak 2009-08-02, 09:11, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-02, 02:25


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:

new NO[MAX_PLAYERS];
if(!NO[playerid]){


...

w linijce 15112 nie masz na ko?cu ;

Podpis

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

Postaw piwo autorowi tego posta
 

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


Pelo

Streetball is My Job






Wiek: 32
Na forum: 6567 dni
Posty: 32

Piwa: 124

Respekt: 27,3

Ostrzeżeń: 80%
Kod:

(1126) : warning 225: unreachable code
(1374) : warning 225: unreachable code
(3244) : warning 225: unreachable code


1113 - 1127
Kod:

if (strcmp(cmdtext,"/base" ,true)==0){
if(IsPlayerAdmin(playerid))
{
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Wyspa Kikyou.");
SetPlayerPos(playerid,513.7171,-2420.522,6.8003);
return 1;
}
else
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Musisz by? adminem ?eby to u?y?.!");
return 1;
}
return 1;
}


1342 - 1375

Kod:

if(strcmp(cmd, "/skok", true)==0 ) {
new newz;
new tmp[256];
tmp = strtok(cmdtext, idx);
newz = strval(tmp);

if(!newz) {
SendClientMessage(playerid, COLOR_GREEN, "WPISZ: /skok [wysokosc w metrach]");
return 1;
}
else if (newz >20000 || newz <1000) {
SendClientMessage(playerid, COLOR_RED, "Podaj wysoko?? z zakresu od 1000 do 20000 m!");
return 1;
}
else {
format(tmp, sizeof(tmp), "Wykonujesz skok spadochronowy z wysokosci %d m!", newz);
SendClientMessage(playerid, COLOR_GREEN, tmp);
if (GetPlayerMoney(playerid) > 999){
GivePlayerMoney(playerid,-1000);
new Float:x;
new Float:y;
new Float:z;
GivePlayerWeapon(playerid,46,1);
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y,z+newz);
GameTextForPlayer(playerid,"No to HOOOOP!!!",2000,5);
}
else{
SendClientMessage(playerid,COLOR_RED,"Nie stac cie na skok spadochronowy.");
}
return 1;
}
return 1;
}


3238 - 3245

Kod:

new te[256];
if(!IsPlayerAdmin(playerid)) format(te, sizeof(te),"(%d): %s", playerid, text);
else format(te, sizeof(te),"(Admin): %s", text);
SendPlayerMessageToAll(playerid, te);
return 0;
}
return 1;
}


Podpis


Postaw piwo autorowi tego posta
 

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


xqz

otaku desu!






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

Piwa: 5465

Respekt: 418,6
Respekt: 418,6

Po co tyle tych returnow !?


Kod:

if (strcmp(cmdtext,"/base" ,true)==0)
{
if(IsPlayerAdmin(playerid))
{
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Wyspa Kikyou.");
SetPlayerPos(playerid,513.7171,-2420.522,6.8003);
}
else
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Musisz by? adminem ?eby to u?y?.!");
}
return 1;
}

Kod:


if(strcmp(cmd, "/skok", true)==0 ) {
new newz;
new tmp[256];
tmp = strtok(cmdtext, idx);
newz = strval(tmp);

if(!newz) {
SendClientMessage(playerid, COLOR_GREEN, "WPISZ: /skok [wysokosc w metrach]");
return 1;
}
else if (newz >20000 || newz <1000) {
SendClientMessage(playerid, COLOR_RED, "Podaj wysoko?? z zakresu od 1000 do 20000 m!");
return 1;
}
else {
format(tmp, sizeof(tmp), "Wykonujesz skok spadochronowy z wysokosci %d m!", newz);
SendClientMessage(playerid, COLOR_GREEN, tmp);
if (GetPlayerMoney(playerid) > 999){
GivePlayerMoney(playerid,-1000);
new Float:x;
new Float:y;
new Float:z;
GivePlayerWeapon(playerid,46,1);
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y,z+newz);
GameTextForPlayer(playerid,"No to HOOOOP!!!",2000,5);
}
else{
SendClientMessage(playerid,COLOR_RED,"Nie stac cie na skok spadochronowy.");
}
}
return 1;
}


Kod:

new te[256];
if(!IsPlayerAdmin(playerid)) format(te, sizeof(te),"(%d): %s", playerid, text);
else format(te, sizeof(te),"(Admin): %s", text);
SendPlayerMessageToAll(playerid, te);
return 0; //tu nie wiem jak z klamrami. I czy to jest koniec publica..
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-02, 22:17


Pelo

Streetball is My Job






Wiek: 32
Na forum: 6567 dni
Posty: 32

Piwa: 124

Respekt: 27,3

Ostrzeżeń: 80%
Reszta dzia?a,

Tutaj masz ca?y public z tym ostatnim:

Kod:

public OnPlayerText(playerid, text[])
{
if(text[0] == '!') {
if(playerGang[playerid] > 0) {
new gangChat[256];
new senderName[MAX_PLAYER_NAME];
new string[256];

// for(new i = 1; i < strlen(text)+1; i++)
// gangChat[i]=text[i];

strmid(gangChat,text,1,strlen(text));

GetPlayerName(playerid, senderName, sizeof(senderName));
format(string, sizeof(string),"%s: %s", senderName, gangChat);

for(new i = 0; i < gangInfo[playerGang[playerid]][1]; i++) {
SendClientMessage(gangMembers[playerGang[playerid]][i], COLOR_LIGHTBLUE, string);
}
}

return 0;
}

{
new te[256];
if(!IsPlayerAdmin(playerid)) format(te, sizeof(te),"(%d): %s", playerid, text);
else format(te, sizeof(te),"(Admin): %s", text);
SendPlayerMessageToAll(playerid, te);
return 0;
}
return 1;
}


Masz ju? piwko za pomoc.

Podpis


Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-03, 09:15


xqz

otaku desu!






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

Piwa: 5465

Respekt: 418,6
Respekt: 418,6

Kod:

new te[256];
if(!IsPlayerAdmin(playerid)){ format(te, sizeof(te),"(%d): %s", playerid, text);
}else{ format(te, sizeof(te),"(Admin): %s", text);
SendPlayerMessageToAll(playerid, te);
return 0;
}


Tak daj to. I usun ta { nad new te[256];

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-03, 12:25


Pelo

Streetball is My Job






Wiek: 32
Na forum: 6567 dni
Posty: 32

Piwa: 124

Respekt: 27,3

Ostrzeżeń: 80%
Nie ma warningu i r?wnie? nie ma ID ko?o nicku :(

Podpis


Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-03, 12:39


kaminiak

Były Head Admin Psr24.pl






Wiek: 33
Na forum: 6388 dni
Posty: 46
Nick w MP: [PSR]Kaminiak

Piwa: 47

Respekt: 50

Ostrzeżeń: 20%
Kod:

(10023) : error 021: symbol already defined: "SetTimer"
(10044) : error 021: symbol already defined: "SetTimer"
(10050) : error 010: invalid function or declaration
(10058) : error 010: invalid function or declaration


10023-10058
Kod:

SetTimer("MoneyGrubScoreUpdate", 1000, 1);//kasa
SetTimer("checkpointUpdate", 1100, 1);
SetTimer("PirateShipScoreUpdate", 2001, 1);
SetTimer("PropertyScoreUpdate", 420000, 1);
SetTimer("GambleUpdate", 5013, 1);
SetTimer("SavedUpdate",60017, 1);
SetTimer("SettingsExistsCheck", 5000, 1);
SetTimer("autootwarcie" ,600000, true);
SetTimer("CheckPing",80000,1);
MaxPing = 500;
SetTimer("Reklama5a", 600000, 1);//10 min forum
SetTimer("Reklama4a", 700000, 1);//12 min mini rpg
SetTimer("Reklama3a", 840000, 1);//7 min pomoc...
SetTimer("Reklama2a", 980000, 1);//18 min czit
SetTimer("Broniea", 1200000, 1);//20 min bronie
SetTimer("won",1000, 1);
SetTimer("k***",1000, 1);
SetTimer("test",1000, 1);
SetTimer("weaponanti",1000,1);
SetTimer("respawn", 2000000, 1);
//SetTimer("Bot",300000, true);//losowy bot
SetTimer("Naprawa", 500, 1);// m?j un ban
SetTimer("AngleUpdate" , 500, true);
SetTimer("LicznikDriftu", 500, true);
SetTimer("Reklama1", 180000, 0);
SetTimer("antygun",1000,1);
//--- praca
taxowkarz = SetTimer("Taxowkarz", 70000, 1);
medyk = SetTimer("Medyk", 70000, 1);
policjant = SetTimer("Policjant", 70000,1);
fbi = SetTimer("FBI", 70000,1);
swat = SetTimer("SWAT", 70000,1);
wojak = SetTimer("Wojak", 70000,1);
strazak = SetTimer("Strazak", 70000,1);
robotnik = SetTimer("Robotnik", 70000,1);
return 1;}


Podpis
www.Psr24.pl

91.204.163.105:9390
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