Warning in script
#1

PHP код:
warning 202number of arguments does not match definition 
The specific line of the warning is the line of the { after I set the if function.
PHP код:
    
The whole public:
PHP код:
public OnPlayerUpdate(playerid)
{
    if(
GetPlayerPing(playerid) > 200)
    {
        new 
string[128];
        
format(stringsizeof(string), "AdmCmd: %s was Kicked by the server, Reason: High Ping(200+)"GetName(playerid));
        
SendClientMessageToAll(COLOR_REDstring);
        
Kick(playerid);
    }
    return 
1;

Reply
#2

Probably due to the fact you did this:

pawn Код:
if(GetPlayerPing(playerid) > 200)
other then

pawn Код:
if(GetPlayerPing(playerid) >= 200)
Not sure if that is needed, just try it. Good Luck.

EDIT: Tested, compiled fine.

EDIT2: Alright, This is just the way I do it, wasn't quite sure whether it is needed or not. I also tested it with just the >, and it seemed to work fine, but I had another gamemode error other then that, so I wasn't sue whether or not that was it.
Reply
#3

Doesn't work either but I tested the same script I first used on another gamemode and it worked fine.. probably gamemode related.
Reply
#4

@KurtBag, you're wrong. It doesn't matter at all, you can either do the you did it or the way he did. I just copied his code, and it compiled fine. Ehm, there might be something else which interrupts, or he might gave us a wrong line...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)