SA-MP Forums Archive
comando de duda - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: comando de duda (/showthread.php?tid=549910)



comando de duda - Lanzik - 09.12.2014

puse un canal de dudas en mi servidor al principio todo bien pero me atasque
los errores son estos:

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





el comando:

PHP код:
CMD:w(playerid,params[]) {
        if(
IsPlayerConnected(playerid)){
            if(
PlayerInfo[playerid][pDuda] == 1) return SendClientMessage(playeridRojo"Debes Esperar 30 sgundos para enviar otra duda");
            if(
gNewbie[playerid]== 0) return SendClientMessage(playeridAmarillo"Tienes el canal apagado, /canal dudas para habilitarlo!");
            if(
gNewbie[playerid]== 1){
            new 
length strlen(cmdtext);
            while ((
idx length) && (cmdtext[idx] <= ' ')){
                
idx++;
            }
            new 
offset idx;
            new 
result[64];
            while ((
idx length) && ((idx offset) < (sizeof(result) - 1))){
                
result[idx offset] = cmdtext[idx];
                
idx++;
            }
            
result[idx offset] = EOS;
               new 
jugador[MAX_PLAYER_NAME], string[128];
             
GetPlayerName(playeridjugadorsizeof(jugador));
            if(!
strlen(result)) return SendClientMessage(playerid,COLOR_YELLOW"Uso /w [Pregunta]");
            
format(stringsizeof(string), "{009999}({009999}{009966}Canal /w{009999}) [Nivel %d] %s(%d): %s",GetPlayerScore(playerid), jugadorplayerid, (result));
            
SendClientMessageToAll(playerid,string);
            
SendClientMessage(playeridCOLOR_YELLOW"{FFFFFF}Tu pregunta fue Enviada con Exito");
        }
        if(
PlayerInfo[playerid][pDuda] == 0){
            
PlayerInfo[playerid][pDuda] = 1;
        }
        if(
PlayerInfo[playerid][pDuda] == 1){
            
SetTimerEx("FloodTerminado"300000"d"playerid);
        }
       }
        return 
1;
    } 



Respuesta: comando de duda - jotajeda - 09.12.2014

Ya le he dicho que siempre ponga la linea del error, muestre la linea 11730, asн es mas facil ayudar.


Re: comando de duda - Lanzik - 09.12.2014

linea 11730:
PHP код:
if(PlayerInfo[playerid][pDuda] == 1) return SendClientMessage(playeridRojo"Debes Esperar 30 sgundos para enviar otra duda"); 



Respuesta: comando de duda - jotajeda - 09.12.2014

Preciona Control + F y busca PlayerInfo Talvez lo tengas definido de otra manera.


Re: comando de duda - Lanzik - 09.12.2014

solo me sale el playerinfo de esa linea ya no me sale alomejor esque no lo tengo definido


Respuesta: Re: comando de duda - jotajeda - 09.12.2014

Quote:
Originally Posted by Lanzik
Посмотреть сообщение
solo me sale el playerinfo de esa linea ya no me sale alomejor esque no lo tengo definido
Exacto, mira como tienes definido, o busca pDuda y mira en otros lugares como lo tienes definido, talvez info[playerid][pDuda] etc.


Re: comando de duda - Lanzik - 09.12.2014

puse pduda y info[player][pduda]
y solo me salen en el comando /w en otros sitios no


Respuesta: Re: comando de duda - jotajeda - 09.12.2014

Quote:
Originally Posted by Lanzik
Посмотреть сообщение
puse pduda y info[player][pduda]
y solo me salen en el comando /w en otros sitios no
Entonces tiene que agregar йsas variables a su gm.


Re: comando de duda - Lanzik - 09.12.2014

pasamelas


Re: comando de duda - Lanzik - 09.12.2014

como creo necesito un enum y un new?