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

Wysłany: 2016-07-30, 20:12


JestemSuperLIKE

Początkujący grafik






Wiek: 27
Na forum: 3694 dni
Posty: 133

Piwa: 6

Respekt: 40

Nadal mam takie same b??dy ;/

Podpis
By KML
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-31, 12:09


ToxiC.







Wiek: 28
Na forum: 5246 dni
Posty: 3792

Piwa: 8590

Respekt: 1143,8
Respekt: 1143,8

Daj wi?cej kodu, najlepiej ca?? t? funkcj? w kt?rej ten kod si? znajduje i do tego list? error?w.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-31, 13:07


JestemSuperLIKE

Początkujący grafik






Wiek: 27
Na forum: 3694 dni
Posty: 133

Piwa: 6

Respekt: 40

Kod:


UltimateDM2/functions.inc(1514) : error 021: symbol already defined: "format"
UltimateDM2/functions.inc(1516) : error 010: invalid function or declaration
UltimateDM2/functions.inc(2282) : error 025: function heading differs from prototype
C:\Users\Kamil1\Desktop\Ultimate DeathMatch\v2.6\gamemodes\new2.pwn(9308) : warning 203: symbol is never used: "longMessageToAll"

linijka 1514-1516
Kod:


format(string, 300, "%s(ID:%d) Gracz: %s", PlayerName(playerid), playerid, text); //format(s, 300, "%d {%06x}%s: {%06x}%s", playerid, GetPlayerColor(playerid) >>> 8, pName[playerid], rangColor[Rank[playerid]] >>> 8, text);
longMessageToAll(C_GREY, s, rangColor[Rank[playerid]]);
return writeLog("[TEXT] %s (%d): %s", pName[playerid], playerid, text), 0;

2282-2298
Kod:


longMessageToAll(color, message[], secondcolor = -1)
{
new LimitedMsg[2][144];

if(strlen(message) > 144)
{
strmid(LimitedMsg[0], message, 0, 139);
format(LimitedMsg[0], 144, "%s", LimitedMsg[0]);

strmid(LimitedMsg[1], message, 139, strlen(message));
format(LimitedMsg[1], 144, "%s", LimitedMsg[1]);

SCMTA(color, LimitedMsg[0]);
return SCMTA(secondcolor, LimitedMsg[1]);
}
return SCMTA(color, message);
}

To chyba tyle wystarczy

Podpis
By KML
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-31, 13:47


ToxiC.







Wiek: 28
Na forum: 5246 dni
Posty: 3792

Piwa: 8590

Respekt: 1143,8
Respekt: 1143,8

Kod:

format(string, 300, "%s(ID:%d) Gracz: %s", PlayerName(playerid), playerid, text); //format(s, 300, "%d {%06x}%s: {%06x}%s", playerid, GetPlayerColor(playerid) >>> 8, pName[playerid], rangColor[Rank[playerid]] >>> 8, text);
longMessageToAll(C_GREY, s, rangColor[Rank[playerid]]);
return writeLog("[TEXT] %s (%d): %s", pName[playerid], playerid, text), 0;


Dalej tutaj masz b??d. Nie poprawi?e? go. Albo korzystasz ze zmiennej s, albo string. Zdecyduj si? i zmie?, pami?taj aby wy?ej nad tym kodem utworzy? t? zmienn?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 01:06


JestemSuperLIKE

Początkujący grafik






Wiek: 27
Na forum: 3694 dni
Posty: 133

Piwa: 6

Respekt: 40

Pr?bowa?em z 2godzi i nadal s? b??dy. Wszystko mam pomieszane w function. Nwm gdzie da? string i s.

Podpis
By KML
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 07:21


Iggy

#admin






Wiek: 26
Na forum: 4596 dni
Posty: 3469
Nick w MP: Iggy

Piwa: 1716

Respekt: 915
Respekt: 915Respekt: 915


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
JestemSuperLIKE, jak formatujesz zmienn? string to wstawiasz string, jak s to s, tyle. A pisa?em ju? kilka razy, ?e takie wklejanie kodu do innego gm bez usuni?cia tych rzeczy co s? oryginalnie nie jest za dobre i wszystko si? pomiesza. :/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 19:38


JestemSuperLIKE

Początkujący grafik






Wiek: 27
Na forum: 3694 dni
Posty: 133

Piwa: 6

Respekt: 40

Zrobi?em i nie wyskoczy?y b??d?w przy komplikacji. Jak chcia?em co? napisa? na czacie to nic nie by?o wida? ID, nicku, rangi i tekstu.
To jest kod z rangami:
Kod:


if (Rank[playerid] == 4) {
format(s, 300, "%d {%06x}%s {F00000}(Head Admin){FFFFFF}: %s", playerid, GetPlayerColor(playerid) >>> 8, pName[playerid], text);
}
else if(Rank[playerid] == 3) {
format(s, 300, "%d {%06x}%s {0064C8}(Admin){FFFFFF}: %s", playerid, GetPlayerColor(playerid) >>> 8, pName[playerid], text);
}
else if(Rank[playerid] == 2) {
format(s, 300, "%d {%06x}%s {65C902}(Moderator){FFFFFF}: %s", playerid, GetPlayerColor(playerid) >>> 8, pName[playerid], text);
}
else if(Rank[playerid] == 1 && !eventMaker[playerid]) {
format(s, 300, "%d {%06x}%s {FDCA31}(VIP){FFFFFF}: %s", playerid, GetPlayerColor(playerid) >>> 8, pName[playerid], text);
}
else if(eventMaker[playerid])
{
format(s, 300, "%d {%06x}%s {808080}(Gracz){FFFFFF}: %s", playerid, GetPlayerColor(playerid) >>> 8, pName[playerid], text);
}

longMessageToAll(C_GREY, s, rangColor[Rank[playerid]]);
return writeLog("[TEXT] %s (%d): %s", pName[playerid], playerid, text), 0;
}


[ Dodano: 2016-08-02, 00:19 ]
Uda?o si?. Temat jest do zamkni?cia.

Postaw piwo autorowi tego posta
 

 
Tagi: rangi :: samp
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » Rangi SAMP Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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