PDA

View Full Version : error 001 expected token "}", but found "-string-"


CTos
08/06/2017, 10:59 PM
hi
I tried to compile my gamemode with the lines below but i get the 001 error which is
(239)error 001: expected token: "}", but found "-string-"

Lines:
new RandomMSG[][] =
{
"Saw a Cheater/Hacker/Abuser ? Use [/report], Its the simple way to get rid of them"
(239)"Bored of the game ? Why dont you join the DMs ? [/dms]"
"Have anything to say or any requests? Tell us on our forum [/site] and we will answer you in a minute!"
"If the command [/report] wasn't useful enough, Then inform our admins by reporting the issue on our forum [/site]"
"We are always helping you!"

DarkBr
08/06/2017, 11:25 PM
new RandomMSG[][4] =
{
{"Saw a Cheater/Hacker/Abuser ? Use [/report], Its the simple way to get rid of them"},
{"Bored of the game ? Why dont you join the DMs ? [/dms]"},
{"Have anything to say or any requests? Tell us on our forum [/site] and we will answer you in a minute!"},
{"If the command [/report] wasn't useful enough, Then inform our admins by reporting the issue on our forum [/site]"},
{"We are always helping you!"}

};

Loinal
08/06/2017, 11:31 PM
new RandomMSG[][4] =
{
{"Saw a Cheater/Hacker/Abuser ? Use [/report], Its the simple way to get rid of them"},
{"Bored of the game ? Why dont you join the DMs ? [/dms]"},
{"Have anything to say or any requests? Tell us on our forum [/site] and we will answer you in a minute!"},
{"If the command [/report] wasn't useful enough, Then inform our admins by reporting the issue on our forum [/site]"},
{"We are always helping you!"}

};

new RandomMSG[][4] =
its 5

Whatname
08/06/2017, 11:38 PM
new RandomMSG[][4] =
its 5

Wrong it's 128

Loinal
08/06/2017, 11:40 PM
Wrong it's 128

128 what????
Please that kills me

CTos
08/06/2017, 11:41 PM
Thanks! Sorry for being a noob but still having problems!
The error disappeared
but 2 new errors
Errors are:

( 238 ) : error 018: initialization data exceeds declared size
( 260 ) : error 010: invalid function or declaration


Lines:

new RandomMSG[][22] =
{
(238){"Saw a Cheater/Hacker/Abuser ? Use [/report], Its the simple way to get rid of them"}
{"Bored of the game ? Why dont you join the DMs ? [/dms]"}
{"Have anything to say or any requests? Tell us on our forum [/site] and we will answer you in a minute!"}
{"If the command [/report] wasn't useful enough, Then inform our admins by reporting the issue on our forum [/site]"}
{"We are always helping you!"}
{"Never Give Up!"}
{"Just Do It!"}
{"BEFORE YOU PLAY! Read our [/rules] and be informed of rules,If we catch you rule breaking, You have no chance of getting away!"}
{"The Server is on Team Death Match mode, 200 Limit players, Map San Andreas"}
{"We are always watching YOU! Even when admins are off! So watch your steps! [/rules]"}
{"Reporting people that make crashes, DDoS and... to us will be rewarded"}
{"If you believe yourself of being an admin, Then no problem, Request on forums! [/site]"}
{"Always remember! Helmets are protective shields and will prevent your head from annoying headshots!"}
{"Never even try BASE RAPING! You know that its already on [/rules] and its a restricted thing, Doing it equals punishments"}
{"Using Names and Words that contains [Racism, Political, Sarcasm and..] Will result in a heavy punishment"}
{"Never try offending someone, Its not good ! Doing it equals punishments"}
{"New to Server? Welcome! Please read our /rules , /cmds , /help , /ranks , /unlocks"}
{"You know whats the features of being a V.I.P[Donor]? Read [/vip] then!"}
{"Flooding and Spamming will be auto-kicked or a ban by our admins, If you continue flooding or spamming!"}
{"This server doesn't support or relate anything politicaly or nationaly, Its just for fun!"}
{"Dont expect dualie weapons, Real war is this!"}
{"Reporting a cheater can make the server clean, So everyone can play!, Even you right there!"}
(260)};

Whatname
08/06/2017, 11:44 PM
You need more than 5 cells to send that text else it would be something like that


Message: hello there
5 cells will display hello
You need more cells for that


So the right code would be



new MSG[][128] =
{
"Hello",
"Something",
"Something hshshdgdhshdhshgsbsusisksnsnebbsbehehehehejej" //
};

Whatname
08/06/2017, 11:48 PM
Thanks! Sorry for being a noob but still having problems!
The error disappeared
but new 2 errors
Errors are:


Lines:

new RandomMSG[][22] =
{
(238){"Saw a Cheater/Hacker/Abuser ? Use [/report], Its the simple way to get rid of them"}
{"Bored of the game ? Why dont you join the DMs ? [/dms]"}
{"Have anything to say or any requests? Tell us on our forum [/site] and we will answer you in a minute!"}
{"If the command [/report] wasn't useful enough, Then inform our admins by reporting the issue on our forum [/site]"}
{"We are always helping you!"}
{"Never Give Up!"}
{"Just Do It!"}
{"BEFORE YOU PLAY! Read our [/rules] and be informed of rules,If we catch you rule breaking, You have no chance of getting away!"}
{"The Server is on Team Death Match mode, 200 Limit players, Map San Andreas"}
{"We are always watching YOU! Even when admins are off! So watch your steps! [/rules]"}
{"Reporting people that make crashes, DDoS and... to us will be rewarded"}
{"If you believe yourself of being an admin, Then no problem, Request on forums! [/site]"}
{"Always remember! Helmets are protective shields and will prevent your head from annoying headshots!"}
{"Never even try BASE RAPING! You know that its already on [/rules] and its a restricted thing, Doing it equals punishments"}
{"Using Names and Words that contains [Racism, Political, Sarcasm and..] Will result in a heavy punishment"}
{"Never try offending someone, Its not good ! Doing it equals punishments"}
{"New to Server? Welcome! Please read our /rules , /cmds , /help , /ranks , /unlocks"}
{"You know whats the features of being a V.I.P[Donor]? Read [/vip] then!"}
{"Flooding and Spamming will be auto-kicked or a ban by our admins, If you continue flooding or spamming!"}
{"This server doesn't support or relate anything politicaly or nationaly, Its just for fun!"}
{"Dont expect dualie weapons, Real war is this!"}
{"Reporting a cheater can make the server clean, So everyone can play!, Even you right there!"}
(260)};


Not 22, 128

CTos
08/06/2017, 11:49 PM
is it going to be random ?
Cuz i used settimer and stuff for RandomMSG

Whatname
08/06/2017, 11:51 PM
if you use random function then yes


new rand = random(sizeof(RandomMSG));
SendClientMessageToAll(-1, RandomMSG[rand]);