error en un comando para LSPD
#1

Resumen del pedido: -error en un comando para LSPD
Explicaciуn detallada del pedido: -Hola pщse el comando es que hay alli abajo y me sale esos errores y no se solucionar estuve mirando y no puedo solucionar
GM Base (opcional): - Zona Sur
Notas (opcional): - +1

Errores:
[color=#FF0000]
PHP код:
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11495) : warning 217loose indentation
C
:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11495) : error 017undefined symbol "PlayerInfo"
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11495) : warning 215expression has no effect
C
:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11495) : error 001expected token";"but found "]"
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11495) : error 029invalid expressionassumed zero
C
:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11495) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

linea 11495
pawn Код:
if(PlayerInfo[playerid][pFaccion] == 1){SendClientMessage(playerid,Rojo,"* No formas parte de una facciуn."); return 1;}
Comandos puesto:
pawn Код:
CMD:miembros(playerid,params[]) {
new string[128];
    if(PlayerInfo[playerid][pFaccion] == 1){SendClientMessage(playerid,Rojo,"* No formas parte de una facciуn."); return 1;}
    format(string, sizeof(string), "Faccion = %d", PlayerInfo[playerid][pFaccion]);
    new faccion[30];
    format(string, sizeof(string), "Miembros conectados de %s:", faccion);
    SendClientMessage(playerid, Amarillo, string);
    for(new i = 0; i < MAX_PLAYERS; i++){
        if(IsPlayerConnected(i) && i != INVALID_PLAYER_ID){
            if(PlayerInfo[i][pFaccion] == PlayerInfo[playerid][pFaccion]){
                format(string, sizeof(string), "- %s [ID: %d] (%d)", PlayerInfo[i][pNombre], i, PlayerInfo[i][pRango]);
                SendClientMessage(playerid, Blanco, string);
            }
        }
    }
    return 1;
}
Reply
#2

Hay dice que no tenes definido PlayerInfo,
Reply
#3

Revise el Gm y PlayerInfo esta definido con PI osea solo cambia el PlayerInfo de lo que hiciste por PI
Reply
#4

pawn Код:
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11493) : warning 217: loose indentation
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11493) : error 079: inconsistent return types (array & non-array)
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11497) : error 035: argument type mismatch (argument 2)
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11501) : error 017: undefined symbol "Nombre"
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11502) : error 017: undefined symbol "Blanco"
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11506) : error 079: inconsistent return types (array & non-array)
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11507) : warning 217: loose indentation
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11507) : error 029: invalid expression, assumed zero
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11507 -- 11509) : warning 215: expression has no effect
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11509) : error 001: expected token: ";", but found "forward"
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11509) : error 029: invalid expression, assumed zero
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(11509) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


10 Errors.
asi lo tengo

pawn Код:
CMD:miembros(playerid,params[]) {
new string[128];
    if(PI[playerid][Faccion] == 1){SendClientMessage(playerid,Rojo,"* No formas parte de una facciуn."); return 1;}
    format(string, sizeof(string), "Faccion = %d", PI[playerid][Faccion]);
    new faccion[30];
    format(string, sizeof(string), "Miembros conectados de %s:", faccion);
    SendClientMessage(playerid, COL_YELLOW, string);
    for(new i = 0; i < MAX_PLAYERS; i++){
        if(IsPlayerConnected(i) && i != INVALID_PLAYER_ID){
            if(PI[i][Faccion] == PI[playerid][Faccion]){
                format(string, sizeof(string), "- %s [ID: %d] (%d)", PI[i][Nombre], i, PI[i][pRango]);
                SendClientMessage(playerid, Blanco, string);
            }
        }
    }
    return 1;
)

cambie algunas cosas como estan definidad en mi gamemode y mira
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)