Random Message Error
#1

Код:
C:\Documents and Settings\Luis29\Mis documentos\Downloads\Compressed\samp03dsvr_R2_win32\filterscripts\miFS.pwn(28) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luis29\Mis documentos\Downloads\Compressed\samp03dsvr_R2_win32\filterscripts\miFS.pwn(28) : error 008: must be a constant expression; assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Well, those are the mistakes that gives me the following code.

Код:
new randMSG = random(sizeof(ramdon));
    SendClientMessageToAll(-1, ramdon[randMSG]);
please, I hope yours help.
Reply
#2

are romain
I translated with ******
I hope you understand



Posts enough?
example:
[GodplaY BOT]: Want to know the community forum? / forum and you'll find.
Urmaritii following steps:

Add to forward to the last as not to confuse gamemodu
line

Код:
forward rMessage();
then the new

Код:
new rMessageList[][] = {
"{6EF83C}[GodplaY-BOT]:{FFFFFF}Ai vazut vreun Codat ? /report si-l vom rezolva!",
"{6EF83C}[GodplaY-BOT]:{FFFFFF}Ai nevoie de ajutor ? /needhelp si te ajutam!",
"{6EF83C}[GodplaY-BOT]:{FFFFFF}Vrei niste detalii despre server ? /serverinfo!!"
};
new rCheckList[sizeof(rMessageList)];
Of course here you can change the message ..
then the public

Код:
public rMessage()
{
        new rNumber, Check = 0;
        do{
            for(new i=0; i<sizeof(rCheckList); i++)
                        if(rCheckList[i] != 0)
                                Check++;
                if(Check == sizeof(rCheckList))
                    for(new i=0; i<sizeof(rCheckList); i++)
                        rCheckList[i] = 0;
                rNumber = random(sizeof(rMessageList));
        }while(rCheckList[rNumber]);
    SendClientMessageToAll(-1, rMessageList[rNumber]);
        rCheckList[rNumber] = 1;
}
at onGameModeInit

Код:
SetTimer("rMessage", 300000, 1);
here about safety precautions set of 5 in 5 minutes but it changed
300,000 instead put more ...

I hope it will go is made ​​easy and simple so ...
Reply
#3

Jeje listo, ya lo habнa resuelto pero no lo habia notificбdo por falta de Red el problema era, que agregaba una coma (,) al ultimo contenido del array.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)