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

Wysłany: 2012-12-15, 16:53


.::KoKoS::.







Wiek: 29
Na forum: 5223 dni
Posty: 5



Respekt: 50

Witam serdecznie, zwracam si? o pomoc do was. Robi? komend? "/unblock" i mam errory.

To tak, najpierw dam errory

Kod:

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


Dodam, ?e robi? t? komend? w filterscript, nie w gamemodzie

A o to komenda, znaczy ca?y public onplayercommandtext.

Kod:


public OnPlayerCommandText(playerid, cmdtext[])
{
new tmp[80];
new string[500];
new cmd[60],idx;
new strtok[60];
cmd = strtok(cmdtext, idx); <--- Linijka z b??dem
if(strval(cmd)>30) return 1;

if(GraczZalogowany[playerid]==0) return 1;


{
if(!strcmp(cmdtext, "unblock", true))
{
if(IsPlayerConnected(playerid))
{
new cmd;
new toadminlevel;
if(!ToAdminLevel(playerid,2)){ return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
Info(playerid,"/unblock [Imi? i Nazwisko]");
return 1;
}
new giveplayerid;
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayername) && giveplayername != INVALID_PLAYER_ID)
{
if(giveplayerid == playerid){ return 1; }
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[250];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, KOLOR_ERROR, "Wpisz: /unblock [Imi? i Nazwisko]");
return 1;
}

format(string, sizeof(string), "~p~Blokada Konta~n~~r~Gracz: %s~n~~r~zosta?a zdj?ta przez: %s~n~~y~%s",Nick(giveplayerid),PlayerInfo[playerid][pNickOOC],result);
TextInfo(string,20);
SendClientMessage(giveplayerid,0x911316FF,string);
PlayerInfo[giveplayerid][pBlock]=1;
if(PlayerInfo[playerid][pAdmin] > 0 && PlayerInfo[playerid][pAdmin] < 4)
format(string, sizeof(string), "(( [ADM-I]: GameMaster [%d] %s zablokowa? konto %s! ))",playerid,PlayerInfo[playerid][pNickOOC],Nick(giveplayerid));
else
format(string, sizeof(string), "(( [ADM-I]: Admin [%d] %s zablokowa? konto %s! ))",playerid,PlayerInfo[playerid][pNickOOC],Nick(giveplayerid));
OstrzezAdmina(KOLOR_ADMINFO,string);
ACKick(giveplayerid);
return 1;
}else{ SendClientMessage(playerid, KOLOR_ERROR, "Poda?e? nie prawid?owe ID!"); return 1; }
}
return 1;
}


Prosz? o pomoc, patrzy?em w praserze b??d?w, ale nic mi to nie pomaga :(
Z g?ry dzi?kuj? :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-12-15, 17:08


The Fake







Wiek: 29
Na forum: 5964 dni
Posty: 36
Nick w MP: isoa.fake

Piwa: 17

Respekt: 50

Kod:

new cmd[60],idx;

zmie? na
Kod:

new cmd,idx;


i
Kod:

if(IsPlayerConnected(playerid))
{
new cmd;
new toadminlevel;

na
Kod:

if(IsPlayerConnected(playerid))
{
new toadminlevel;


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-12-15, 17:13


.::KoKoS::.







Wiek: 29
Na forum: 5223 dni
Posty: 5



Respekt: 50

dalej to samo

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-12-15, 17:16


The Fake







Wiek: 29
Na forum: 5964 dni
Posty: 36
Nick w MP: isoa.fake

Piwa: 17

Respekt: 50

a teraz sie dopatrzy?em :) Usu? new strtok[60];

Jak ci wyskoczy error "Undefined symbol" wklej to na dole mapy:

Kod:

strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}

new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-12-15, 17:21


.::KoKoS::.







Wiek: 29
Na forum: 5223 dni
Posty: 5



Respekt: 50

Kod:

Skrypty na serwer.pwn(443) : error 017: undefined symbol "strtok"
Skrypty na serwer.pwn(444) : error 035: argument type mismatch (argument 1)
C:\Documents and Settings\Mateusz\Pulpit\U-RP\Central-RP\gamemodes\Skrypty na serwer.pwn(444) : error 079: inconsistent return types (array & non-array)
Skrypty na serwer.pwn(446) : error 017: undefined symbol "GraczZalogowany"
Skrypty na serwer.pwn(446) : warning 215: expression has no effect
Skrypty na serwer.pwn(446) : error 001: expected token: ";", but found "]"
Skrypty na serwer.pwn(446) : error 029: invalid expression, assumed zero
Skrypty na serwer.pwn(446) : fatal error 107: too many error messages on one line


Linijka od 443 do 446

Kod:

cmd = strtok(cmdtext, idx);
if(strval(cmd)>30) return 1;

if(GraczZalogowany[playerid]==0) return 1;


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-12-15, 17:24


The Fake







Wiek: 29
Na forum: 5964 dni
Posty: 36
Nick w MP: isoa.fake

Piwa: 17

Respekt: 50

Wklei?e? funkcje strtok kt?r? ci poda?em?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-12-15, 17:25


.::KoKoS::.







Wiek: 29
Na forum: 5223 dni
Posty: 5



Respekt: 50

tak, na samiu?kim dole skryptu

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-12-15, 23:02


ToxiC.







Wiek: 28
Na forum: 5246 dni
Posty: 3792

Piwa: 8590

Respekt: 1143,8
Respekt: 1143,8

Kod:


cmd = strtok(cmdtext, idx);
if(strval(cmd > 30)) return 1;

if(GraczZalogowany[playerid]==0) return 1;


po za tym na g?rze skryptu dodaj:
Kod:


new GraczZalogowany[MAX_PLAYERS];


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-12-16, 00:15


.::KoKoS::.







Wiek: 29
Na forum: 5223 dni
Posty: 5



Respekt: 50

Dalej nie dzia?a

Postaw piwo autorowi tego posta
 

 
Tagi: [inne] :: komenda :: /unblock
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [GF] [Inne] Komenda /unblock 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