please help
#1

PHP код:
COMMAND:radio(playerid,params[])
{
    new 
text[256];
    if(
sscanf(params,"s",text)) return SendClientMessage(playerid,COLOR_RED,"Usage: /radio [Text]");
    else
    {
    new 
textmessage[256];
    
format(textmessagesizeof(textmessage), "%s",text);
    
SendRadioMessage(playerid,textmessage);
    }
    return 
1;

PHP код:
stock SendRadioMessage(playerid,message)
{
    for(new 
0MAX_PLAYERSi++)
    {
       if(
RLTnfo[i][Radio] == 1)
       {
            if(
RLTnfo[i][RadioHZ] == RLTnfo[playerid][RadioHZ])
            {
            new 
sendmessage[256];
            
format(sendmessagesizeof(sendmessage), "[Radio Message] %s",message);
             
SendClientMessage(i,COLOR_RED,sendmessage);
            }
        }
    }
    return 
1;
    } 
PHP код:
D:\Downloads\ZombieWorld\filterscripts\reality.pwn(378) : error 035argument type mismatch (argument 2)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error

Line 378:
PHP код:
    SendRadioMessage(playerid,textmessage); 
I know that the problem is anywhere from, Stock and playerid but I can not fix it, please help
Reply
#2

Quote:
Originally Posted by rumen98
Посмотреть сообщение
PHP код:
Stock SendRadioMessage(playerid,textmessage
Here
Reply
#3

when i remove playerid from Stock i got this errors
PHP код:
D:\Downloads\ZombieWorld\pawno\include\SRB.inc(154) : error 017undefined symbol "playerid"
D:\Downloads\ZombieWorld\filterscripts\reality.pwn(396) : error 035argument type mismatch (argument 1)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
2 Errors

Edit:
does not matter did it like that, without Stock

PHP код:
COMMAND:radio(playerid,params[])
{
    new 
text[256];
    if(
sscanf(params,"s",text)) return SendClientMessage(playerid,COLOR_RED,"Usage: /radio [Text]");
    else
    {
        new 
textmessage[256];
        
format(textmessagesizeof(textmessage), "{FF0000}[Radio]{ADD8E6}%s",text);
        for(new 
loopplayers 0loopplayers<MAX_PLAYERSloopplayers ++)
        {
            if(
IsPlayerConnected(loopplayers))
            {
                if(
RLTnfo[loopplayers][Radio] == 1)
                 {
                    if(
RLTnfo[loopplayers][RadioHZ] == RLTnfo[playerid][RadioHZ])
                    {
                        
SendClientMessage(loopplayers,COLOR_LIGHTBLUE,textmessage);
                    }
                }
            }
        }
    }
    return 
1;

Reply
#4

Dude you mismatched argument 2 in stock and radiomessage function
Just replace the stock line with the one i provided in previous reply. Dont remove playerid.
Reply
#5

pawn Код:
stock SendRadioMessage(playerid, message[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
       if(RLTnfo[i][Radio] == 1)
       {
            if(RLTnfo[i][RadioHZ] == RLTnfo[playerid][RadioHZ])
            {
                format(message, sizeof(message), "[Radio Message] %s",message);
                SendClientMessage(i, COLOR_RED, message);
            }
        }
    }
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)