SA-MP Forums Archive
[Ajuda] meu /darvip bugou gm - 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: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] meu /darvip bugou gm (/showthread.php?tid=390876)



meu /darvip bugou gm - DrKaFuZo - 08.11.2012

comentarios unuteis = report | ajudas = +rep

Код:
if(strcmp(cmd, "/darvip", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 1341)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem autorizaзгo para usar esse comando.");
                return 1;
            }
            VipVaga();
            if(VagaSobrando == 0)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Nгo hб mais vagas na lista use /limparvip primeiro.");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [id] [Nivel]");
                return 1;
            }
            new para1;
            new level;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [id] [Nivel]");
                return 1;
            }
            level = strval(tmp);
            GetPlayerName(para1, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(IsPlayerConnected(para1))
            {
                if(para1 != INVALID_PLAYER_ID)
                {
                    format(string, sizeof string, "Vocк deu VIP Nнvel %d para %s", level, giveplayer);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    format(string, sizeof string, "Vocк ganhou VIP Nнvel %d do admin %s", level, sendername);
                    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                    getdate(year, month, day);
                    gettime(hour,minute,second);
                    format(string, sizeof(string), "%s deu vip ao %s nнvel %d (%d/%d/%d - %d:%d)",sendername,giveplayer,level,day, month, year,hour, minute);
                    VipsLog(string);
                    PlayerInfo[para1][pVIP] = level;
                    new var03 = 0;
                    for(new i = 0; i < sizeof(VipInfo); i++)
                    {
                        if(strcmp(giveplayer,VipInfo[i][vNick],true)==0)
                        {
                            VipInfo[i][vTipo] = level;
                            SaveVip();
                            var03 = 1;
                            break;
                        }
                    }
                    if(var03 == 0)
                    {
                        for(new i = 0; i < sizeof(VipInfo); i++)
                        {
                            if(strcmp("Ninguem",VipInfo[i][vNick],true)==0)
                            {
                                strmid(VipInfo[i][vNick], giveplayer, 0, strlen(giveplayer), 255);
                                VipInfo[i][vTipo] = level;
                                SaveVip();
                                break;
                            }
                        }
                    }
                }
            }
        }
        return 1;
    }
	if (strcmp(cmd, "/limparvip", true) == 0)
	{
		if(PlayerInfo[playerid][pAdmin] < DONO)
		{
			SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo estб autorizado a usar este comando!");
			return true;
		}
	    tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_GRAD2, "USE: /limparvip [Vaga]");
			return true;
		}
		new Vagao = strval(tmp);
		if(Vagao < 0 || Vagao > 50) { SendClientMessage(playerid, COLOR_GREY, "Vaga mнnima 0 mбximo 50!"); return true; }
		if(IsPlayerOnline(VipInfo[Vagao][vNick]))
  		{
		    new id=GetPlayerID(VipInfo[Vagao][vNick]);
		    PlayerInfo[id][pVIP] = 0;
			SendClientMessage(id, COLOR_YELLOW, "Vocк perdeu seu VIP, renove-o e receba seus benefнcios de volta");
		}
		getdate(year, month, day);
		gettime(hour,minute,second);
		format(string, sizeof(string), "%s limpou vip vaga %d de %s (%d/%d/%d - %d:%d)",PlayerName(playerid),Vagao,VipInfo[Vagao][vNick],day, month, year,hour, minute);
		VipsLog(string);
		strmid(VipInfo[Vagao][vNick], "Ninguem", 0, strlen("Ninguem"), 255);
		VipInfo[Vagao][vTipo] = 0;
	    SaveVip();
	    format(string, sizeof(string), "Vocк Limpou A Vaga VIP Nє %d",Vagao);
		SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	    return true;
		}
da esse seguinte erro ate nos meus backups

\
Код HTML:
pawno\include\dutils.inc(45) : warning 219: local variable "hour" shadows a variable at a preceding level
pawno\include\dutils.inc(45) : warning 219: local variable "minute" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "second" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "day" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "month" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "year" shadows a variable at a preceding level
\gamemodes\PlayFacil.pwn(1900) : error 017: undefined symbol "GetVehicleParamsEx"
\gamemodes\PlayFacil.pwn(1900) : error 017: undefined symbol "SetVehicleParamsEx"
\gamemodes\PlayFacil.pwn(1900) : error 017: undefined symbol "SetVehicleParamsEx"
\gamemodes\PlayFacil.pwn(1900) : fatal error 107: too many error messages on one line
eu acho que bugou pq fui colocar vips por mes


Re: meu /darvip bugou gm - tonisantolia - 08.11.2012

pawno\include\dutils.inc(45) : warning 219: local variable "hour" shadows a variable at a preceding level
pawno\include\dutils.inc(45) : warning 219: local variable "minute" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "second" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "day" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "month" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "year" shadows a variable at a preceding level

Destaque a linha 45 e todas as new's que tem no topo da OnPlayerCommandText.

\gamemodes\PlayFacil.pwn(1900) : error 017: undefined symbol "GetVehicleParamsEx"
\gamemodes\PlayFacil.pwn(1900) : error 017: undefined symbol "SetVehicleParamsEx"
\gamemodes\PlayFacil.pwn(1900) : error 017: undefined symbol "SetVehicleParamsEx"
\gamemodes\PlayFacil.pwn(1900) : fatal error 107: too many error messages on one line

Mude o GetVehicleParamsEx e SetVehicleParamsEx para GetVehicleParams e SetVehicleParams


AW: meu /darvip bugou gm - Vinicius_TroLL - 08.11.2012

Perae to quase achando as linhas na minha bola de cristal



Re: AW: meu /darvip bugou gm - tonisantolia - 08.11.2012

Quote:
Originally Posted by Vinicius_TroLL
Посмотреть сообщение
Perae to quase achando as linhas na minha bola de cristal
Sу pelos erros da para ter uma noзгo do que estб errado..
Sу pedi as linhas 45 e as arrays que estгo no topo de OnPlayerCommandText para ter certeza..


Re: AW: meu /darvip bugou gm - DrKaFuZo - 08.11.2012

Quote:
Originally Posted by Vinicius_TroLL
Посмотреть сообщение
Perae to quase achando as linhas na minha bola de cristal
report!


Re: meu /darvip bugou gm - DrKaFuZo - 08.11.2012

Quote:
Originally Posted by tonisantolia
Посмотреть сообщение
pawno\include\dutils.inc(45) : warning 219: local variable "hour" shadows a variable at a preceding level
pawno\include\dutils.inc(45) : warning 219: local variable "minute" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "second" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "day" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "month" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "year" shadows a variable at a preceding level

Destaque a linha 45 e todas as new's que tem no topo da OnPlayerCommandText.

\gamemodes\PlayFacil.pwn(1900) : error 017: undefined symbol "GetVehicleParamsEx"
\gamemodes\PlayFacil.pwn(1900) : error 017: undefined symbol "SetVehicleParamsEx"
\gamemodes\PlayFacil.pwn(1900) : error 017: undefined symbol "SetVehicleParamsEx"
\gamemodes\PlayFacil.pwn(1900) : fatal error 107: too many error messages on one line

Mude o GetVehicleParamsEx e SetVehicleParamsEx para GetVehicleParams e SetVehicleParams
vou tentar fazer isso, mas acho q ja tentei so que estava de madruga e acabei deixando passar alguma coisa se der certo meu +rep e seu! pela ajuda!


Re: meu /darvip bugou gm - humildadeforever - 08.11.2012

Precisa ter 50+ posts pra dar rep.


Re: meu /darvip bugou gm - DrKaFuZo - 08.11.2012

Quote:
Originally Posted by humildadeforever
Посмотреть сообщение
Precisa ter 50+ posts pra dar rep.
obrigado pelo aviso! mudou minha vida!


Re: meu /darvip bugou gm - DrKaFuZo - 08.11.2012

Quote:
Originally Posted by tonisantolia
Посмотреть сообщение
pawno\include\dutils.inc(45) : warning 219: local variable "hour" shadows a variable at a preceding level
pawno\include\dutils.inc(45) : warning 219: local variable "minute" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "second" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "day" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "month" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "year" shadows a variable at a preceding level

Destaque a linha 45 e todas as new's que tem no topo da OnPlayerCommandText.

\gamemodes\PlayFacil.pwn(1900) : error 017: undefined symbol "GetVehicleParamsEx"
\gamemodes\PlayFacil.pwn(1900) : error 017: undefined symbol "SetVehicleParamsEx"
\gamemodes\PlayFacil.pwn(1900) : error 017: undefined symbol "SetVehicleParamsEx"
\gamemodes\PlayFacil.pwn(1900) : fatal error 107: too many error messages on one line

Mude o GetVehicleParamsEx e SetVehicleParamsEx para GetVehicleParams e SetVehicleParams
olha no que deu:
Код HTML:
\pawno\include\dutils.inc(45) : warning 219: local variable "hour" shadows a variable at a preceding level
pawno\include\dutils.inc(45) : warning 219: local variable "minute" shadows a variable at a preceding level
pawno\include\dutils.inc(45) : warning 219: local variable "second" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "day" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "month" shadows a variable at a preceding level
\pawno\include\dutils.inc(45) : warning 219: local variable "year" shadows a variable at a preceding level
\gamemodes\PlayFacil.pwn(1900) : error 017: undefined symbol "GetVehicleParams"
\gamemodes\PlayFacil.pwn(1900) : error 017: undefined symbol "SetVehicleParams"
\gamemodes\PlayFacil.pwn(1900) : error 017: undefined symbol "SetVehicleParams"
\gamemodes\PlayFacil.pwn(1900) : fatal error 107: too many error messages on one line