SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 04/02/2016, 11:37 PM   #1
izeatfishz
Huge Clucker
 
izeatfishz's Avatar
 
Join Date: Jun 2012
Posts: 231
Reputation: 43
Default Werid error:

SendNearbyMessage(playerid, 15.0, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);

number of arguments does not match definition


however:

stock SendNearbyMessage(playerid, Float:radius, string[], col1, col2, col3, col4, col5)

everything matches up fine? :c
izeatfishz is offline   Reply With Quote
Old 05/02/2016, 12:00 AM   #2
Trucido
Big Clucker
 
Join Date: Jun 2011
Posts: 95
Reputation: 30
Default Re: Werid error:

you copypasted something and it didnt work..?

post Sendnearbymessage func
Trucido is offline   Reply With Quote
Old 05/02/2016, 03:37 AM   #3
Swedky
Banned
 
Join Date: Jun 2013
Location: Argentina.
Posts: 2,042
Reputation: 827
Default Respuesta: Werid error:

Or just do this:

pawn Code:
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);

for(new i = 0; i <= GetPlayerPoolSize(); i++)
{
    if(IsPlayerConnected(i) && GetPlayerDistanceFromPoint(i, Pos[0], Pos[1], Pos[2]) <= 15.0) SendClientMessage(i, COLOR_PURPLE, string);
}
Swedky is offline   Reply With Quote
Old 05/02/2016, 05:59 AM   #4
GangstaSunny
Big Clucker
 
Join Date: Nov 2014
Posts: 153
Reputation: 45
Default Re: Werid error:

Looks like the ProxDetector-Code.
Try to use this code instead. You can rename the stock.

PHP Code:
stock ProxDetector(Float:radiplayeridtext[],col1,col2,col3,col4,col5)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
Float:posxFloat:posyFloat:posz;
        new 
Float:oldposxFloat:oldposyFloat:oldposz;
        new 
Float:tempposxFloat:tempposyFloat:tempposz;
        
GetPlayerPos(playeridoldposxoldposyoldposz);
        for(new 
0MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i))
            {
                if(
GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
                {
                    
GetPlayerPos(iposxposyposz);
                    
tempposx = (oldposx -posx);
                    
tempposy = (oldposy -posy);
                    
tempposz = (oldposz -posz);
                    if (((
tempposx radi/16) && (tempposx > -radi/16)) && ((tempposy radi/16) && (tempposy > -radi/16)) && ((tempposz radi/16) && (tempposz > -radi/16)))
                    {
                        
SendClientMessage(icol1text);
                    }
                    else if (((
tempposx radi/8) && (tempposx > -radi/8)) && ((tempposy radi/8) && (tempposy > -radi/8)) && ((tempposz radi/8) && (tempposz > -radi/8)))
                    {
                        
SendClientMessage(icol2text);
                    }
                    else if (((
tempposx radi/4) && (tempposx > -radi/4)) && ((tempposy radi/4) && (tempposy > -radi/4)) && ((tempposz radi/4) && (tempposz > -radi/4)))
                    {
                        
SendClientMessage(icol3text);
                    }
                    else if (((
tempposx radi/2) && (tempposx > -radi/2)) && ((tempposy radi/2) && (tempposy > -radi/2)) && ((tempposz radi/2) && (tempposz > -radi/2)))
                    {
                        
SendClientMessage(icol4text);
                    }
                    else if (((
tempposx radi) && (tempposx > -radi)) && ((tempposy radi) && (tempposy > -radi)) && ((tempposz radi) && (tempposz > -radi)))
                    {
                        
SendClientMessage(icol5text);
                    }
                }
            }
        }
    }
    return 
1;

GangstaSunny is offline   Reply With Quote
Reply

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
werid error and i can't fix it. Yves Scripting Help 6 11/05/2014 08:46 PM
Some werid error xXxnOIZXXX Client Support 5 12/07/2012 02:10 PM
1 werid error. Haydz Help Archive 4 28/10/2010 05:21 AM
Werid error too803 Client Support 6 27/12/2009 11:57 PM
Werid Error Code too803 Client Support 2 19/10/2009 03:19 PM


All times are GMT. The time now is 05:20 AM.


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