Again: error 001: expected token: "-string end-", but found "-identifier-" -
XGreen - 30.09.2014
Код:
C:(799) : error 001: expected token: "-string end-", but found "-identifier-"
C:(801) : error 010: invalid function or declaration
PHP код:
new randomMessages[][] =
{
""COL_WHITE"["COL_BLUE"SERVER]"COLOR_GREY" Found A Bug? Let Us Know! Report It Here: www.Apocalypse-Z.tk",//line 799
""COL_WHITE"["COL_BLUE"SERVER]"COLOR_GREY" Seen A Hacker/Rulebreaker? Let Us Know With ' /report <id> <reason> ' ."
};//line 801
PHP код:
function RandomMessages()
{
new randomMsg = random(sizeof(randomMessages));
SendClientMessageToAll(-1, randomMessages[randomMsg]);
}
This Error Is Completely Messing up with me before, any help?
Re: Again: error 001: expected token: "-string end-", but found "-identifier-" -
YanLanger - 30.09.2014
can u show the full code ?
Re: Again: error 001: expected token: "-string end-", but found "-identifier-" -
XGreen - 30.09.2014
thats it.
Re: Again: error 001: expected token: "-string end-", but found "-identifier-" -
YanLanger - 30.09.2014
Hmm, lemme try to see what's wrong
Re: Again: error 001: expected token: "-string end-", but found "-identifier-" -
dusk - 30.09.2014
What if you remove those colors from text?
Re: Again: error 001: expected token: "-string end-", but found "-identifier-" -
Stinged - 30.09.2014
Show me the COLOR_ defines.
Re: Again: error 001: expected token: "-string end-", but found "-identifier-" -
TakeiT - 30.09.2014
Random Messages don't work like that.
pawn Код:
new randomMessages
[][] = { "Found A Bug? Let Us Know! Report It Here: www.Apocalypse-Z.tk",
" Seen A Hacker/Rulebreaker? Let Us Know With ' /report <id> <reason> ' ." ,
}
pawn Код:
RandomMessages() //There is no need to use "Function" or public or stock or anything like that..
{
new randomMsg = random(sizeof(randomMessages)), string[150];
format(string, sizeof(string), "[{0000FF}SERVER{FFFFFF}]: {E6E6E6} %s", randomMessages[randomMsg]);
SendClientMessageToAll(-1, string);
}
You cannot use double quotes in anything, nor can you use defines in color embedding. Replace my colors in the {} with the ones of your choice, but they have to be the actual color code. Unfortunately, this isn't PHP, and you can't simply use the echo function to print stuff.
Re: Again: error 001: expected token: "-string end-", but found "-identifier-" -
Eth - 30.09.2014
it should be
pawn Код:
new randomMessages
[][] = { "Found A Bug? Let Us Know! Report It Here: www.Apocalypse-Z.tk",
" Seen A Hacker/Rulebreaker? Let Us Know With ' /report <id> <reason> ' ." };
Re: Again: error 001: expected token: "-string end-", but found "-identifier-" -
TakeiT - 30.09.2014
Quote:
Originally Posted by Eth
it should be
pawn Код:
new randomMessages [][] = { "Found A Bug? Let Us Know! Report It Here: www.Apocalypse-Z.tk", " Seen A Hacker/Rulebreaker? Let Us Know With ' /report <id> <reason> ' ." };
|
Thank you for copying my post. If I already answered it, why would you copy me?
Re: Again: error 001: expected token: "-string end-", but found "-identifier-" -
XGreen - 01.10.2014
Quote:
Originally Posted by TakeiT
Random Messages don't work like that.
pawn Код:
new randomMessages [][] = { "Found A Bug? Let Us Know! Report It Here: www.Apocalypse-Z.tk", " Seen A Hacker/Rulebreaker? Let Us Know With ' /report <id> <reason> ' ." , }
pawn Код:
RandomMessages() //There is no need to use "Function" or public or stock or anything like that.. { new randomMsg = random(sizeof(randomMessages)), string[150]; format(string, sizeof(string), "[{0000FF}SERVER{FFFFFF}]: {E6E6E6} %s", randomMessages[randomMsg]); SendClientMessageToAll(-1, string); }
You cannot use double quotes in anything, nor can you use defines in color embedding. Replace my colors in the {} with the ones of your choice, but they have to be the actual color code. Unfortunately, this isn't PHP, and you can't simply use the echo function to print stuff.
|
Thanks For Help! +1