Paulie 0 Odesláno: 7. Březen, 2009 Share Odesláno: 7. Březen, 2009 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 More sharing options...
0 -other-Mizi_CZ 0 Odesláno: 7. Březen, 2009 Share Odesláno: 7. Březen, 2009 chybý ti tam jedna zavorka na konci} Link to comment Share on other sites More sharing options...
0 Guest NtCat Odesláno: 7. Březen, 2009 Share Odesláno: 7. Březen, 2009 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 More sharing options...
0 癌癌癌 1 Odesláno: 7. Březen, 2009 Share Odesláno: 7. Březen, 2009 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 More sharing options...
0 Paulie 0 Odesláno: 7. Březen, 2009 Author Share Odesláno: 7. Březen, 2009 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 More sharing options...
0 癌癌癌 1 Odesláno: 7. Březen, 2009 Share Odesláno: 7. Březen, 2009 omg umíš číst?? říkám smaž " ; "! Link to comment Share on other sites More sharing options...
0 Paulie 0 Odesláno: 7. Březen, 2009 Author Share Odesláno: 7. Březen, 2009 Sice sem to smazal ale sou tam 4 erory a to v řádku if(povolanie[playerid] == 1) a mezi new to mam new povolani[MAX_PLAYERS]; Link to comment Share on other sites More sharing options...
0 Daffy 8 Odesláno: 7. Březen, 2009 Share Odesláno: 7. Březen, 2009 povolani a povolanie neni to tez Link to comment Share on other sites More sharing options...
0 Paulie 0 Odesláno: 7. Březen, 2009 Author Share Odesláno: 7. Březen, 2009 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 More sharing options...
0 Guest NtCat Odesláno: 7. Březen, 2009 Share Odesláno: 7. Březen, 2009 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 More sharing options...
0 Paulie 0 Odesláno: 7. Březen, 2009 Author Share Odesláno: 7. Březen, 2009 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 More sharing options...
0 ondra852 0 Odesláno: 7. Březen, 2009 Share Odesláno: 7. Březen, 2009 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 mě to totiž nic nepíše, uplně v poho, takže fakt nwm co s tim je :?: :?: Link to comment Share on other sites More sharing options...
0 Paulie 0 Odesláno: 7. Březen, 2009 Author Share Odesláno: 7. Březen, 2009 Tak to je dobrý no A dal s tom tam přesně nebo sis to upravil? Link to comment Share on other sites More sharing options...
0 -other-Mizi_CZ 0 Odesláno: 7. Březen, 2009 Share Odesláno: 7. Březen, 2009 a co kdyby jsi dal i věci předtím a za tím ?? Link to comment Share on other sites More sharing options...
0 Paulie 0 Odesláno: 7. Březen, 2009 Author Share Odesláno: 7. Březen, 2009 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 Link to comment Share on other sites More sharing options...
0 Guest NtCat Odesláno: 7. Březen, 2009 Share Odesláno: 7. Březen, 2009 Pokiaľ viem, tak pName(playerid). Ale neviem, či to súvisí s týmto. Link to comment Share on other sites More sharing options...
0 Mattsy 29 Odesláno: 7. Březen, 2009 Share Odesláno: 7. Březen, 2009 lol ja pName pouzivam takto to funkcie/prikazu si dam new pname[MAX_PLAYER_NAME]; a potom doplnujem do formatu na koniec pName Link to comment Share on other sites More sharing options...
0 Guest NtCat Odesláno: 7. Březen, 2009 Share Odesláno: 7. Březen, 2009 No, aj to sa dá, ja to mám cez stock a je to jednoduchšie, lebo si to nemusíš definovať v každej funkcii osobitne. :rap: Link to comment Share on other sites More sharing options...
0 Mattsy 29 Odesláno: 7. Březen, 2009 Share Odesláno: 7. Březen, 2009 njn mne to pasuje lepsie takto, premna to je jednoduchsie Link to comment Share on other sites More sharing options...
0 Guest NtCat Odesláno: 7. Březen, 2009 Share Odesláno: 7. Březen, 2009 Tak vidíš :rap2: ale myslím, že problém vyriešený, teda LOCK. Link to comment Share on other sites More sharing options...
0 ondra852 0 Odesláno: 7. Březen, 2009 Share Odesláno: 7. Březen, 2009 Tak to je dobrý no A dal s tom tam přesně nebo sis to upravil? jen sem dal ctrl + c a ctrl + v Link to comment Share on other sites More sharing options...
0 Paulie 0 Odesláno: 8. Březen, 2009 Author Share Odesláno: 8. Březen, 2009 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 More sharing options...
0 -other-Mizi_CZ 0 Odesláno: 8. Březen, 2009 Share Odesláno: 8. Březen, 2009 dej celej příkaz Link to comment Share on other sites More sharing options...
0 Paulie 0 Odesláno: 8. Březen, 2009 Author Share Odesláno: 8. Březen, 2009 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 More sharing options...
0 Guest NtCat Odesláno: 8. Březen, 2009 Share Odesláno: 8. Březen, 2009 Hovorím ti, že stock pName(playerid) a potom pName(playerid) v príkaze, nie len pName! Link to comment Share on other sites More sharing options...
0 -other-Mizi_CZ 0 Odesláno: 8. Březen, 2009 Share Odesláno: 8. Březen, 2009 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 More sharing options...
Dotaz
Paulie 0
Zdar mam problém skoušel jsem příkaz v dcmd takle ho mam
A v Onplayercommand...
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
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 accountSign in
Already have an account? Sign in here.
Sign In Now