Number of Arguments does not match definition!
#1

I get an error on this line, and I can't figure out why...

Код:
ProxDetector(20, playerid, string, 0xE6E6E6E6, 0xC8C8C8C8, 0xAAAAAAAA, 0x8C8C8C8C, 0x6E6E6E6E);
Код:
C:\Users\OfficerHotStuff\Desktop\Roleplay GameMode\gamemodes\roleplay.pwn(769) : warning 202: number of arguments does not match definition
C:\Users\OfficerHotStuff\Desktop\Roleplay GameMode\gamemodes\roleplay.pwn(769) : warning 202: number of arguments does not match definition
C:\Users\OfficerHotStuff\Desktop\Roleplay GameMode\gamemodes\roleplay.pwn(769) : warning 202: number of arguments does not match definition
C:\Users\OfficerHotStuff\Desktop\Roleplay GameMode\gamemodes\roleplay.pwn(769) : warning 202: number of arguments does not match definition
Reply
#2

It this located under - OnPlayerText?

If so, make sure it returns 0. Not 1.
Reply
#3

It returns 0, here's just some of the code.

Код:
public OnPlayerText(playerid, text[])
{
    new string[128];
    format(string, sizeof(string), "%s says: %s", RemoveUnderScore(playerid), text);
    ProxDetector(20, playerid, string, 0xE6E6E6E6, 0xC8C8C8C8, 0xAAAAAAAA, 0x8C8C8C8C, 0x6E6E6E6E);
    format(string, sizeof(string), "%s", text);
    SetPlayerChatBubble(playerid, string, WHITE, 20.0, 10000);
    return 0;
}
Reply
#4

Код:
ProxDetector(20.0, playerid, string, 0xE6E6E6E6, 0xC8C8C8C8, 0xAAAAAAAA, 0x8C8C8C8C, 0x6E6E6E6E);
Try also defining those colors. I don't know what else it could be because it all looks OK for me.
Reply
#5

Try this:
Use these defines:
PHP код:
#define COLOR_FADE1 0xFFFFFFFF
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E 
PHP код:
public OnPlayerText(playeridtext[])
{
    new 
pname[24], str[128];
    
GetPlayerName(playeridpname24);
    
format(strsizeof(str), "%s Says: %s"RemoveUnderScore(playerid), text);
    
ProxDetector(20.0playeridstrCOLOR_FADE1COLOR_FADE2COLOR_FADE3COLOR_FADE4COLOR_FADE5);
    
format(stringsizeof(string), "%s"text);
    
SetPlayerChatBubble(playeridstringWHITE20.010000);
    return 
0;

Edit: Took this out of my GM(Updated it to your needs)
Reply
#6

Still doesn't work.
Reply
#7

I just updated my code. It worked quite well for me with no errors/warnings. I suggest it.
Reply
#8

Tried it, still warnings.
Reply
#9

Make sure this is what the rest of the code looks like:
PHP код:
ProxDetector(Float:radiplayeridstring[], col1col2col3col4col5)
{
    new 
Float:pPositionX[3], Float:oPositionX[3];
    
GetPlayerPos(playeridpPositionX[0], pPositionX[1], pPositionX[2]);
    foreach(
Playeri)
    {
        
GetPlayerPos(ioPositionX[0], oPositionX[1], oPositionX[2]);
        if(
IsPlayerInRangeOfPoint(iradi 16pPositionX[0], pPositionX[1], pPositionX[2])) { SendClientMessage(icol1string); }
        else if(
IsPlayerInRangeOfPoint(iradi 8pPositionX[0], pPositionX[1], pPositionX[2])) { SendClientMessage(icol2string); }
        else if(
IsPlayerInRangeOfPoint(iradi 4pPositionX[0], pPositionX[1], pPositionX[2])) { SendClientMessage(icol3string); }
        else if(
IsPlayerInRangeOfPoint(iradi 2pPositionX[0], pPositionX[1], pPositionX[2])) { SendClientMessage(icol4string); }
        else if(
IsPlayerInRangeOfPoint(iradipPositionX[0], pPositionX[1], pPositionX[2])) { SendClientMessage(icol5string); }
    }
    return 
1;

If this still doesn't work, I'd suggest starting over with the local chat and use this tutorial:
https://sampforum.blast.hk/showthread.php?tid=279575
Reply
#10

Thank you so much! REP'd!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)