SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Thread Tools Display Modes
Old 14/07/2017, 01:01 PM   #21
Little Clucker
2xRichard's Avatar
Join Date: Jul 2017
Posts: 3
Reputation: 0
Default Re: Random Messages [Simple]

// This is a comment
// uncomment the line below if you want to write a filterscript

#include <a_samp>
#if defined FILTERSCRIPT

#define COLOR_GREEN 0x33AA33AA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xCC0000AA

forward RandomMessages();

//Random Messages//
new RandomMessages[][] =
"Message 1 (Change this)",
"Message 2 (Change this)",
"Message 3 (Change this)"

public OnGameModeInit()
return 1;

public RandomMessages()
SendClientMessageToAll(COLOR_GREEN, RandomMessages[random(sizeof(RandomMessages))];
return 1;

//Get To me Eror :
C:\Users\Richard\Desktop\RandomPms.pwn(36) : error 021: symbol already defined: "RandomMessages"
C:\Users\Richard\Desktop\RandomPms.pwn(37) : error 028: invalid subscript (not an array or too many subscripts): "RandomMessages"
C:\Users\Richard\Desktop\RandomPms.pwn(37) : error 072: "sizeof" operator is invalid on "function" symbols
C:\Users\Richard\Desktop\RandomPms.pwn(37) : error 029: invalid expression, assumed zero
C:\Users\Richard\Desktop\RandomPms.pwn(37) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
2xRichard is offline   Reply With Quote
Old 14/07/2017, 01:11 PM   #22
Little Clucker
Join Date: Jul 2017
Location: Los Santos, The Federal Bureau of Investigation HQ
Posts: 36
Reputation: 10
Default Re: Random Messages [Simple]

Can you give me the whole code ?
I can't read this shit.
main ()
                 Return 1;
H4RR1s is offline   Reply With Quote
Old 14/07/2017, 01:24 PM   #23
Little Clucker
xMoBi's Avatar
Join Date: Jul 2017
Location: Pakistan
Posts: 21
Reputation: 6
Default Re: Random Messages [Simple]

The code in this topic has a naming error in function and variable.
I'll start scripting from September
xMoBi is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Simple Random Messages 2KY Tutorials 4 19/01/2012 06:58 PM
[Tutorial] How to create Simple Random Messages. [Nikk] Tutorials 13 16/01/2012 04:15 PM
[FilterScript] SW 3D Random Messages [VERY SIMPLE][13.12.2011] SpiderWalk Filterscripts 8 13/12/2011 03:51 PM
[Help] Random Messages Trawltrawl Help Archive 4 16/08/2011 08:50 PM
[FilterScript] P-Messages [Random Messages system] Pooh7 Filterscripts 5 30/11/2010 03:43 PM

All times are GMT. The time now is 11:06 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.