• Welcome to Vice City Multiplayer.
 

Kick to High Ping by Madara

Started by Madara, March 27, 2011, 10:15:54 PM

Previous topic - Next topic

0 Members and 5 Guests are viewing this topic.

[CHG].Vercetty.

heii ola mmm soy KCHAT jejeje ske ya estaba registrado con estge nick xD bueno el caso es ke me marca error en esta linea

public AntiLaag()
{
    for(new i = 0; i <= MAX_PLAYERS; i++) {
    new sendmsn[256],plr = FindPlayerIDFromString(pInfo[NameSaved]);        <------------------ ESPECIFICAMENTE EN ESTA

   if (SpInfo[plr][CheckPing] == 1 && GetPlayerPing(plr) >= 1000) {
       format(sendmsn,256, "Server - Kicked: %s, ID: %d, Reason:[ High Ping - %d ].",gPlayers[plr],plr,GetPlayerPing(plr));
            SendClientMessageToAll(0x377DFFFF,sendmsn);
       Kick(plr);
       }
   }
}

====================================================================
Errores

F:\.......\......\......\gamemodes\DMGM3.5.pwn(2703) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
F:\......\......\......\gamemodes\DMGM3.5.pwn(2703) : warning 215: expression has no effect
F:\......\......\......\gamemodes\DMGM3.5.pwn(2703) : error 001: expected token: ";", but found "]"
F:\......\......\......\gamemodes\DMGM3.5.pwn(2703) : error 029: invalid expression, assumed zero
F:\......\......\......\gamemodes\DMGM3.5.pwn(2703) : fatal error 107: too many error messages on one line

Madara

Quote from: [CHG].Vercetty. on April 01, 2011, 02:32:36 PM
heii ola mmm soy KCHAT jejeje ske ya estaba registrado con estge nick xD bueno el caso es ke me marca error en esta linea

public AntiLaag()
{
    for(new i = 0; i <= MAX_PLAYERS; i++) {
    new sendmsn[256],plr = FindPlayerIDFromString(pInfo[NameSaved]);        <------------------ ESPECIFICAMENTE EN ESTA

   if (SpInfo[plr][CheckPing] == 1 && GetPlayerPing(plr) >= 1000) {
       format(sendmsn,256, "Server - Kicked: %s, ID: %d, Reason:[ High Ping - %d ].",gPlayers[plr],plr,GetPlayerPing(plr));
            SendClientMessageToAll(0x377DFFFF,sendmsn);
       Kick(plr);
       }
   }
}

====================================================================
Errores

F:\.......\......\......\gamemodes\DMGM3.5.pwn(2703) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
F:\......\......\......\gamemodes\DMGM3.5.pwn(2703) : warning 215: expression has no effect
F:\......\......\......\gamemodes\DMGM3.5.pwn(2703) : error 001: expected token: ";", but found "]"
F:\......\......\......\gamemodes\DMGM3.5.pwn(2703) : error 029: invalid expression, assumed zero
F:\......\......\......\gamemodes\DMGM3.5.pwn(2703) : fatal error 107: too many error messages on one line

Ahi deberias haber puesto un tipo de consulta de un nombre hacia un jugador, en este caso puedes ponerle gPlayers ( si es que lo tienes )

tato






<!-- Facebook Badge START --><a href="http://es-es.facebook.com/eduardoeslindo" target="_TOP" style="font-family: &quot;lucida grande&quot;,tahoma,verdana,arial,sans-serif; font-size: 11px; font-variant: normal; font-style: normal; font-weight: normal; color: #3B5998; text-decoration: none;" title="Eduardo Estrada">Eduardo Estrada</a><br/><a href="http://es-es.facebook.com/eduardoeslindo" target="_TOP" title="Eduardo Estrada"><img src="http://badge.facebook.com/badge/697470158.6069.1979465113.png" width="120" height="272" style="b

yazeen