1 Error
#1

I get error when I compile this:

Код:
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\filterscripts\randommessages.pwn(25) : error 018: initialization data exceeds declared size
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
#include <a_samp>
#define GREEN 0x21DD00FF
#define RED 0xE60000FF
#define ADMIN_RED 0xFB0000FF
#define YELLOW 0xFFFF00FF
#define ORANGE 0xF97804FF
#define LIGHTRED 0xFF8080FF
#define LIGHTBLUE 0x00C2ECFF
#define PURPLE 0xB360FDFF
#define PLAYER_COLOR 0xFFFFFFFF
#define BLUE 0x1229FAFF
#define LIGHTGREEN 0x38FF06FF
#define DARKPINK 0xE100E1FF
#define DARKGREEN 0x008040FF
#define ANNOUNCEMENT 0x6AF7E1FF
#define COLOR_SYSTEM 0xEFEFF7AA
#define GRAY 0xCECECEFF
new RandMsg;
new ANNOUNCEMENTS[6][128] ={
"HelpBot: Thank you for playing on this server!", // EDIT THIS
"HelpBot: Go to www.julius95.yolasite.com", // EDIT THIS
"HelpBot: Join the forum at www.julius95.yolasite.com", // EDIT THIS
"HelpBot: Enjoy this server. Feel free to invite your friends!", // EDIT THIS
"HelpBot: No cheating. Be nice to other players and play fairly", // EDIT THIS
"HelpBot: Use Y and N to change what radio station you want to listen to", // EDIT THIS

};
public OnFilterScriptInit()
{
RandMsg = 0;
SetTimer("GlobalAnnouncement" ,120000,true); // Change the time if you want to. But remember, 1000 = 1 sec
return 1;
}
forward GlobalAnnouncement();
public GlobalAnnouncement()
{
switch (RandMsg)
{
case 0: {SendClientMessageToAll(ANNOUNCEMENT,ANNOUNCEMENTS[0]); RandMsg++;} // -- This will be the first message
case 1: {SendClientMessageToAll(ANNOUNCEMENT,ANNOUNCEMENTS[1]); RandMsg++;}
case 2: {SendClientMessageToAll(LIGHTGREEN,ANNOUNCEMENTS[1]); RandMsg++;}
case 3: {SendClientMessageToAll(LIGHTGREEN,ANNOUNCEMENTS[1]); RandMsg++;}
case 4: {SendClientMessageToAll(LIGHTGREEN,ANNOUNCEMENTS[1]); RandMsg++;}
case 5: {SendClientMessageToAll(RED,ANNOUNCEMENTS[2]); RandMsg = 0;} // -- and This will be the last message
}
return 1;
}
Reply
#2

Quote:
Originally Posted by JEkvall95
Посмотреть сообщение
I get error when I compile this:

Код:
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\filterscripts\randommessages.pwn(25) : error 018: initialization data exceeds declared size
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
#include <a_samp>
#define GREEN 0x21DD00FF
#define RED 0xE60000FF
#define ADMIN_RED 0xFB0000FF
#define YELLOW 0xFFFF00FF
#define ORANGE 0xF97804FF
#define LIGHTRED 0xFF8080FF
#define LIGHTBLUE 0x00C2ECFF
#define PURPLE 0xB360FDFF
#define PLAYER_COLOR 0xFFFFFFFF
#define BLUE 0x1229FAFF
#define LIGHTGREEN 0x38FF06FF
#define DARKPINK 0xE100E1FF
#define DARKGREEN 0x008040FF
#define ANNOUNCEMENT 0x6AF7E1FF
#define COLOR_SYSTEM 0xEFEFF7AA
#define GRAY 0xCECECEFF
new RandMsg;
new ANNOUNCEMENTS[6][128] ={
"HelpBot: Thank you for playing on this server!", // EDIT THIS
"HelpBot: Go to www.julius95.yolasite.com", // EDIT THIS
"HelpBot: Join the forum at www.julius95.yolasite.com", // EDIT THIS
"HelpBot: Enjoy this server. Feel free to invite your friends!", // EDIT THIS
"HelpBot: No cheating. Be nice to other players and play fairly", // EDIT THIS
"HelpBot: Use Y and N to change what radio station you want to listen to", // EDIT THIS

};
public OnFilterScriptInit()
{
RandMsg = 0;
SetTimer("GlobalAnnouncement" ,120000,true); // Change the time if you want to. But remember, 1000 = 1 sec
return 1;
}
forward GlobalAnnouncement();
public GlobalAnnouncement()
{
switch (RandMsg)
{
case 0: {SendClientMessageToAll(ANNOUNCEMENT,ANNOUNCEMENTS[0]); RandMsg++;} // -- This will be the first message
case 1: {SendClientMessageToAll(ANNOUNCEMENT,ANNOUNCEMENTS[1]); RandMsg++;}
case 2: {SendClientMessageToAll(LIGHTGREEN,ANNOUNCEMENTS[1]); RandMsg++;}
case 3: {SendClientMessageToAll(LIGHTGREEN,ANNOUNCEMENTS[1]); RandMsg++;}
case 4: {SendClientMessageToAll(LIGHTGREEN,ANNOUNCEMENTS[1]); RandMsg++;}
case 5: {SendClientMessageToAll(RED,ANNOUNCEMENTS[2]); RandMsg = 0;} // -- and This will be the last message
}
return 1;
}
pawn Код:
#include <a_samp>
#define GREEN 0x21DD00FF
#define RED 0xE60000FF
#define ADMIN_RED 0xFB0000FF
#define YELLOW 0xFFFF00FF
#define ORANGE 0xF97804FF
#define LIGHTRED 0xFF8080FF
#define LIGHTBLUE 0x00C2ECFF
#define PURPLE 0xB360FDFF
#define PLAYER_COLOR 0xFFFFFFFF
#define BLUE 0x1229FAFF
#define LIGHTGREEN 0x38FF06FF
#define DARKPINK 0xE100E1FF
#define DARKGREEN 0x008040FF
#define ANNOUNCEMENT 0x6AF7E1FF
#define COLOR_SYSTEM 0xEFEFF7AA
#define GRAY 0xCECECEFF
new RandMsg;
new ANNOUNCEMENTS[6][128] ={
"HelpBot: Thank you for playing on this server!", // EDIT THIS
"HelpBot: Go to www.julius95.yolasite.com", // EDIT THIS
"HelpBot: Join the forum at www.julius95.yolasite.com", // EDIT THIS
"HelpBot: Enjoy this server. Feel free to invite your friends!", // EDIT THIS
"HelpBot: No cheating. Be nice to other players and play fairly", // EDIT THIS
"HelpBot: Use Y and N to change what radio station you want to listen to" // EDIT THIS

};
public OnFilterScriptInit()
{
RandMsg = 0;
SetTimer("GlobalAnnouncement" ,120000,true); // Change the time if you want to. But remember, 1000 = 1 sec
return 1;
}
forward GlobalAnnouncement();
public GlobalAnnouncement()
{
switch (RandMsg)
{
case 0: {SendClientMessageToAll(ANNOUNCEMENT,ANNOUNCEMENTS[0]); RandMsg++;} // -- This will be the first message
case 1: {SendClientMessageToAll(ANNOUNCEMENT,ANNOUNCEMENTS[1]); RandMsg++;}
case 2: {SendClientMessageToAll(LIGHTGREEN,ANNOUNCEMENTS[1]); RandMsg++;}
case 3: {SendClientMessageToAll(LIGHTGREEN,ANNOUNCEMENTS[1]); RandMsg++;}
case 4: {SendClientMessageToAll(LIGHTGREEN,ANNOUNCEMENTS[1]); RandMsg++;}
case 5: {SendClientMessageToAll(RED,ANNOUNCEMENTS[2]); RandMsg = 0;} // -- and This will be the last message
}
return 1;
}
Try this. I removed the comma from the last announcement.
Reply
#3

Replace with :

Код:
new ANNOUNCEMENTS[6][128] = {
"HelpBot: Thank you for playing on this server!", // EDIT THIS
"HelpBot: Go to www.julius95.yolasite.com", // EDIT THIS
"HelpBot: Join the forum at www.julius95.yolasite.com", // EDIT THIS
"HelpBot: Enjoy this server. Feel free to invite your friends!", // EDIT THIS
"HelpBot: No cheating. Be nice to other players and play fairly", // EDIT THIS
"HelpBot: Use Y and N to change what radio station you want to listen to" // EDIT THIS
};
You put a comma in most,at the end of the code..
Reply
#4

just remove the comma in the last line of ANNOUNCEMENTS.


@later...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)