Jump to content
  • 0

pomoc Erory v DCMD


Paulie

Dotaz

Zdar mam problém skoušel jsem příkaz v dcmd takle ho mam

dcmd_zebrat(playerid, params[]);
{
if(povolanie[playerid] == 1)
{
format(string, sizeof(string), "Bezdomovec %s žebrá peníze od hráčů.", pName);
SendClientMessageToAll(COLOR_RED, string);
}

 

A v Onplayercommand...

dcmd(zebrat,6,cmdtext);

 

A nwm co stím a erory to má

error 004: function "dcmd_zebrat" is not implemented

error 055: start of function body without function header

error 010: invalid function or declaration

Link to comment
Share on other sites

25 odpovědí na tuto otázku

Recommended Posts

  • 0

A ešte, s týmto to nesúvisí (s tými errormi), ale daj si tam niekde, do toho príkazu:

#pragma unused params

teda pokiaľ sa za tým /zebrat už nič iné nepíše, pokiaľ tam máš nejaké ďalšie parametre, tak to tam nedávaj ;)

Link to comment
Share on other sites

  • 0
Zdar mam problém skoušel jsem příkaz v dcmd takle ho mam

dcmd_zebrat(playerid, params[]);
{
if(povolanie[playerid] == 1)
{
format(string, sizeof(string), "Bezdomovec %s žebrá peníze od hráčů.", pName);
SendClientMessageToAll(COLOR_RED, string);
}

to dcmd_zebrat(playerid, params[])

";"

 

tam nema bejt takze takhle:

dcmd_zebrat(playerid....){

if(povol........

Link to comment
Share on other sites

  • 0

dcmd_zebrat(playerid, params[]);
{
#pragma unused params
if(povolanie[playerid] == 1)
{
format(string, sizeof(string), "Bezdomovec %s žebrá peníze od hráčů.", pName);
SendClientMessageToAll(COLOR_RED, string);
}

 

Takle to tam mam a dokonce to má už 4 erory

error 004: function "dcmd_zebrat" is not implemented

error 055: start oferror 017: undefined symbol "params" function body without function header

error 010: invalid function or declaration

Link to comment
Share on other sites

  • 0

Sry sem kkt už sem to opravil ,ale zase mam chybu úplně jinde:D

dcmd_zebrat(playerid, params[])

{

#pragma unused params

new string[256];

if(povolani[playerid] == 1)

{

format(string, sizeof(string), "Bezdomovec %s žebrá peníze od hráčů.", pName);

SendClientMessageToAll(COLOR_RED, string);

}

error 017: undefined symbol "pName"

error 030: compound statement not closed at the end of file (started at line 1976)

Link to comment
Share on other sites

  • 0

Chýba ti zase zátvorka } a nemáš nadefinované pName, niekde do módu:

stock pName(playerid)

{

new pName[64];

GetPlayerName(playerid,pName,64);

return pName;

}

 

a potom tam len použiješ pName(playerid) ;)

Link to comment
Share on other sites

  • 0

Lol dík ale furt tam mam eror:D

error 076: syntax error in the expression, or invalid function call

a je to v řádce

format(string, sizeof(string), "Bezdomovec %s žebrá peníze od hráčů.", pName);

Link to comment
Share on other sites

  • 0
Lol dík ale furt tam mam eror:D

error 076: syntax error in the expression, or invalid function call

a je to v řádce

format(string, sizeof(string), "Bezdomovec %s žebrá peníze od hráčů.", pName);

 

 

Tak to sem z toho Lama :d mě to totiž nic nepíše, uplně v poho, takže fakt nwm co s tim je :?: :?:

Link to comment
Share on other sites

  • 0

Už fakt nwm v oplayercommandtext mam

dcmd(zebrat,6,cmdtext); a jakmile to dám pryč tak ten error zmizí a je tam poze warining tak to nechápu :problem:

Link to comment
Share on other sites

  • 0

Ale furt tam mam prolblém s tím jedním erorem.... Prostě jak mam v Onplayercommandtext

dcmd(zebrat,6,cmdtext);

Tak když to odstraním je tam warning když to dam spátky je tam eror takovýhle

error 076: syntax error in the expression, or invalid function call

A píše to že je to na řádku

format(string, sizeof(string), "Bezdomovec %s žebrá peníze od hráčů.", pName);

Tak já už nwm :wtf:

Link to comment
Share on other sites

  • 0
dcmd_zebrat(playerid, params[])
{
#pragma unused params
new string[256];
if(povolani[playerid] == 1)
{
format(string, sizeof(string), "Bezdomovec %s žebrá peníze od hráčů.", pName);
SendClientMessageToAll(COLOR_RED, string);
}
}

Link to comment
Share on other sites

  • 0

a nebo takto, ale jak říká NtCat přes stock je to lepší:

 

dcmd_zebrat(playerid, params[])
{
#pragma unused params
new string[256];
new money;
money == GetPlayerMoney(playerid);
if(money>= 10000)
{
SendclientMessage(playerid,COLOR_RED,"Máš dost peněž");
}else{
if(povolani[playerid] == 1)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,MAX_PLAYER_NAME,pName);]
format(string, sizeof(string), "Bezdomovec %s žebrá peníze od hráčů.", pName);
SendClientMessageToAll(COLOR_RED, string);
}else{
SendClientMessage(playerid,COLOR_RED,"Nejsi bezdomovec");
}
return 1;
}

 

trochu jsem ti to vylpešil

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...