Ispisuje da je svaka komanda neispravna

Započeo #twix, Jun 19, 2020, 23:06:17 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

Problem(error/warning): Bilo koju komandu da ukucam koja postoji/ne postoji izbaci mi da je nepoznata komanda, ako moze neko da mi pomogne oko toga da popravim, bio bih mu mnogo zahvalan!
Deo skripte:
public OnPlayerCommandPerformed(playerid, cmd[], params[], result, flags)
{
	if(isnull(cmd))
	{
	    return false;
	}
	if(!flags)
	{
		SendClientMessage(playerid, -1, ""RED"ERROR: "BELA"Wrong command.");
	}
	if(flags)
	{
	}
    return true;

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
nah

Slika/video ingame problema(obavezno ako je ingame problem): http://prntscr.com/t2zqrt
Poslednja Izmena: Jun 20, 2020, 19:23:44 POSLE PODNE od SlavicBeast
2pac <3

Koliko znam callback OnPlayerCommandPerformed sa ispravnim parametrima je

public OnPlayerCommandPerformed(playerid, cmdtext[], success)


Odakle tebi svi ovi parametri?
Evo ti primer toga što ti hoćeš:

public OnPlayerCommandPerformed(playerid, cmdtext[], success) {	
    if(!success)
        return SendClientMessage(playerid, -1, ""RED"ERROR: "BELA"Wrong command.");
    
    return 1;
}


Poslednja Izmena: Jun 19, 2020, 23:30:34 POSLE PODNE od Crownshot
My tutorials: PawnPlus MySQL, y_colours

Verovatno koristi pawn.cmd, a flagovi se koriste kao provere umesto if u samoj komandi npr da li je igrac admin itd

Citat: Crownshot poslato Jun 19, 2020, 23:28:39 POSLE PODNE
Koliko znam callback OnPlayerCommandPerformed sa ispravnim parametrima je

public OnPlayerCommandPerformed(playerid, cmdtext[], success)


Odakle tebi svi ovi parametri?
Evo ti primer toga što ti hoćeš:

public OnPlayerCommandPerformed(playerid, cmdtext[], success) {	
    if(!success)
        return SendClientMessage(playerid, -1, ""RED"ERROR: "BELA"Wrong command.");
    
    return 1;
}

C:\Users\Lenovo\Desktop\bp od 0\pawno\include\Pawn.CMD.inc(62) : error 025: function heading differs from prototype
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(299) : warning 235: public function lacks forward declaration (symbol "OnPlayerPause")
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(304) : warning 235: public function lacks forward declaration (symbol "OnPlayerResume")
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(784) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(784) : warning 217: loose indentation
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(784) : error 017: undefined symbol "BELA"
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(784) : warning 215: expression has no effect
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(784) : error 001: expected token: ";", but found ")"
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(784) : fatal error 107: too many error messages on one line
2pac <3

C:\Users\Lenovo\Desktop\bp od 0\pawno\include\Pawn.CMD.inc(62) : error 025: function heading differs from prototype
2pac <3

Citat: Darkic poslato Jun 19, 2020, 23:30:59 POSLE PODNE
Verovatno koristi pawn.cmd, a flagovi se koriste kao provere umesto if u samoj komandi npr da li je igrac admin itd
Jao daaaaaa

Citat: #twix poslato Jun 19, 2020, 23:35:32 POSLE PODNE
C:\Users\Lenovo\Desktop\bp od 0\pawno\include\Pawn.CMD.inc(62) : error 025: function heading differs from prototype
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(299) : warning 235: public function lacks forward declaration (symbol "OnPlayerPause")
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(304) : warning 235: public function lacks forward declaration (symbol "OnPlayerResume")
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(784) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(784) : warning 217: loose indentation
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(784) : error 017: undefined symbol "BELA"
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(784) : warning 215: expression has no effect
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(784) : error 001: expected token: ";", but found ")"
C:\Users\Lenovo\Desktop\bp od 0\gamemodes\esterius.pwn(784) : fatal error 107: too many error messages on one line


Izvini zaboravio sam da su ovo parametri za Pawn.CMD skroz mi mozak stao, sad ću popraviti.
public OnPlayerCommandPerformed(playerid, cmd[], params[], result, flags) {	
    if(result == -1) {
        SendClientMessage(playerid, -1, "Unknown command, use /help to see every existing command on server.");
        
        return 0;
    }
    return 1;
}

Poslednja Izmena: Jun 19, 2020, 23:42:22 POSLE PODNE od Crownshot
My tutorials: PawnPlus MySQL, y_colours

Citat: Crownshot poslato Jun 19, 2020, 23:37:38 POSLE PODNE
Jao daaaaaa

Izvini zaboravio sam da su ovo parametri za Pawn.CMD, sad ću popraviti.
public OnPlayerCommandPerformed(playerid, cmd[], params[], result, flags) {	
    if(result == -1) {
        SendClientMessage(playerid, -1, "Unknown command, use /help to see every existing command on server.");
        
        return 0;
    }
    return 1;
}

Hvala <3
Lock.
2pac <3