_K3NT_ Posted February 9, 2018 Posted February 9, 2018 public function lacks forward declaration (symbol "CancelVote") AM incercat sa implemenentez u nsistem de /vote public CancelVote() { if(OnVote == 0) return 0; new str[128], str2[128]; foreach(new i : Player) Voted = -1; format(str, sizeof(str), "Vote: %s is OVER!", Voting[Vote]); format(str2, sizeof(str2), "Yes: %d No: %d", Voting[VoteY], Voting[VoteN]); SendClientMessageToAll(COLOR_GREEN, str); SendClientMessageToAll(COLOR_GREEN, str2); OnVote = 0; Voting[VoteY] = 0; Voting[VoteN] = 0; return 1; }
0 VipBo$$ Posted February 9, 2018 Posted February 9, 2018 (edited) Adauga: forward CancelVote(playerid); Cu placere. Edited February 9, 2018 by AlexBo$$
0 valivaly96 Posted February 9, 2018 Posted February 9, 2018 Acum 3 ore, _K3NT_ a spus: public function lacks forward declaration (symbol "CancelVote") AM incercat sa implemenentez u nsistem de /vote public CancelVote() { if(OnVote == 0) return 0; new str[128], str2[128]; foreach(new i : Player) Voted = -1; format(str, sizeof(str), "Vote: %s is OVER!", Voting[Vote]); format(str2, sizeof(str2), "Yes: %d No: %d", Voting[VoteY], Voting[VoteN]); SendClientMessageToAll(COLOR_GREEN, str); SendClientMessageToAll(COLOR_GREEN, str2); OnVote = 0; Voting[VoteY] = 0; Voting[VoteN] = 0; return 1;} Adauga forward CancelVote(); Acum 3 ore, AlexBo$$ a spus: Adauga: forward CancelVote(playerid); Cu placere. Asa nu o sa mearga, trebuie sa modifice si publicul daca pune playerid
0 matthew. Posted February 9, 2018 Posted February 9, 2018 Așa cum au spus și cei de mai sus, adaugă forward CancelVote(); Pentru a îți fi mai ușor (fără să mai adaugi și forward și public), mai jos ai un define: #define function:%0(%1) forward %0(%1); public %0(%1) Poți folosi această scurtătură pentru a nu mai adauga forward și public de fiecare dată când faci o funcție nouă. 1
0 AlwaysGoLl Posted February 10, 2018 Posted February 10, 2018 Incearca sa vezi daca ai varietatile definite de care ai nevoie!
Question
_K3NT_
public function lacks forward declaration (symbol "CancelVote")
AM incercat sa implemenentez u nsistem de /vote
public CancelVote()
{
if(OnVote == 0) return 0;
new str[128], str2[128];
foreach(new i : Player) Voted = -1;
format(str, sizeof(str), "Vote: %s is OVER!", Voting[Vote]);
format(str2, sizeof(str2), "Yes: %d No: %d", Voting[VoteY], Voting[VoteN]);
SendClientMessageToAll(COLOR_GREEN, str);
SendClientMessageToAll(COLOR_GREEN, str2);
OnVote = 0;
Voting[VoteY] = 0;
Voting[VoteN] = 0;
return 1;
}
5 answers to this question
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