Whats wrong with this? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Whats wrong with this? (
/showthread.php?tid=150872)
Whats wrong with this? -
rohan234 - 28.05.2010
Hello,
Код:
#define FILTERSCRIPT
#define COLOR_LIGHTBLUE 0x33CCFFAA
#include <a_samp>
#if defined FILTERSCRIPT
forward Messages();
new Message[][] =
{
"[Aaron's Finest]Welcome to Aaron's Finest!",
"[Aaron's Finest]Do /cars for cars!",
"[Aaron's Finest]Wanna be in the [AF] S.W.A.T? Do /swat now!!"
"[Aaron's Finest]Wanna be a terrorist and terrorize the city? Do /terror now!"
};
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Automatic Messages by iLcke");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#endif
public OnGameModeInit()
{
SetTimer("Messages", 100000, true); // 12000 = 2 minutes
return 1;
}
public Messages()
{
new randMSG = random(sizeof(Message));
SendClientMessageToAll(COLOR_LIGHTBLUE, Message[randMSG]);
}
whats wrong with that code? when i try to compile it says: D:\Aaron server\filterscripts\messages.pwn(19) : error 001: expected token: "}", but found "-string-"
D:\Aaron server\filterscripts\messages.pwn(20) : error 010: invalid function or declaration
Re: Whats wrong with this? -
ViruZZzZ_ChiLLL - 28.05.2010
You missed a , or comma in the line 18 I think
pawn Код:
"[Aaron's Finest]Wanna be in the [AF] S.W.A.T? Do /swat now!!"
Re: Whats wrong with this? -
rohan234 - 28.05.2010
Done, but when i compile it says : D:\Aaron server\filterscripts\messages.pwn(20) : error 029: invalid expression, assumed zero
D:\Aaron server\filterscripts\messages.pwn(20) : error 008: must be a constant expression; assumed zero
i ahveb this in line 20 : };
Re: Whats wrong with this? -
ViruZZzZ_ChiLLL - 28.05.2010
pawn Код:
#define FILTERSCRIPT
#define COLOR_LIGHTBLUE 0x33CCFFAA
#include <a_samp>
#if defined FILTERSCRIPT
forward Messages();
new Message[][] =
{
"[Aaron's Finest]Welcome to Aaron's Finest!",
"[Aaron's Finest]Do /cars for cars!",
"[Aaron's Finest]Wanna be in the [AF] S.W.A.T? Do /swat now!!",
"[Aaron's Finest]Wanna be a terrorist and terrorize the city? Do /terror now!"
};
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Automatic Messages by iLcke");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#endif
public OnGameModeInit()
{
SetTimer("Messages", 100000, true); // 12000 = 2 minutes
return 1;
}
public Messages()
{
new randMSG = random(sizeof(Message));
SendClientMessageToAll(COLOR_LIGHTBLUE, Message[randMSG]);
}
This compiles fine by me...