Random Messages Problems
#1

PHP код:
//Random Messages
new randomMessages[][] =  
    {
        
"[Evolution Gaming] Hello, Welcome to the community! Founded by Evan!"
        
"[Evolution Gaming] Chat with us on Teamspeak:ts30.gameservers.com:9198",
        
"[Evolution Gaming] Sign up and register at http://gaming-space.net!",
}
SetTimer("randomMessages"60000true);
forward RandomMessages();
public 
RandomMessages()
{
}
forward RandomMessages();
public 
RandomMessages()
{
    new 
randomMsg random(sizeof(randomMessages));
    
SendClientMessageToAll(COLOR_YELLOW randomMessages[randomMsg]);

Theres the Messages code , I get these errors:
PHP код:
C:\Users\Lee\Desktop\E-RPv0.1\gamemodes\E-RPv0.1.pwn(450) : error 029invalid expressionassumed zero
C
:\Users\Lee\Desktop\E-RPv0.1\gamemodes\E-RPv0.1.pwn(457) : error 035argument type mismatch (argument 1)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
2 Errors

Anyone know why?
Reply
#2

Because RandomMessages is already ued.
Код:
//Random Messages 
new randomMessages[][] =   
    { 
        "[Evolution Gaming] Hello, Welcome to the community! Founded by Evan!",  
        "[Evolution Gaming] Chat with us on Teamspeak:ts30.gameservers.com:9198", 
        "[Evolution Gaming] Sign up and register at http://gaming-space.net!", 
} 
SetTimer("RandomMessages", 60000, true); 

forward RandomMessages(); 
public RandomMessages() 
{ 
    new randomMsg = random(sizeof(randomMessages)); 
    SendClientMessageToAll(COLOR_YELLOW , randomMessages[randomMsg]); 
}
Reply
#3

Please edit it and put it into [php] tags
Reply
#4

Thanks , that cured one error , still got:

PHP код:
C:\Users\Lee\Desktop\E-RPv0.1\gamemodes\E-RPv0.1.pwn(450) : error 029invalid expressionassumed zero
C
:\Users\Lee\Desktop\E-RPv0.1\gamemodes\E-RPv0.1.pwn(457) : error 035argument type mismatch (argument 1)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
2 Errors

Reply
#5

Which lines?
Reply
#6

PHP код:
450:}

457:   SendClientMessageToAll(COLOR_YELLOW randomMessages[randomMsg]); 
Reply
#7

PHP код:
//Random Messages 
new randomMessages[][] =   
    { 
        
"[Evolution Gaming] Hello, Welcome to the community! Founded by Evan!",  
        
"[Evolution Gaming] Chat with us on Teamspeak:ts30.gameservers.com:9198"
        
"[Evolution Gaming] Sign up and register at http://gaming-space.net!"

SetTimer("RandomMessages"60000true); 
forward RandomMessages(); 
public 
RandomMessages() 

    new 
randomMsg random(sizeof(randomMessages)); 
    
SendClientMessageToAll(COLOR_YELLOW randomMessages[randomMsg]); 

Reply
#8

REMOVED Incorrect looking again
Just compared the currant code postd above to your orignal code and the fix is above.
Reply
#9

Thanks Britas.
Reply


Forum Jump:


Users browsing this thread: