SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 23/11/2019, 05:02 PM   #1
deivid77
Little Clucker
 
deivid77's Avatar
 
Join Date: Oct 2014
Posts: 23
Reputation: 0
Default Warning 213 e 217

eu vi varios topico de ajuda mas nao consegui resolver

Quote:
C:\Users\Usuario\Desktop\FLMIDIA\gamemodes\FL1-3.pwn(37185) : warning 217: loose indentation
C:\Users\Usuario\Desktop\FLMIDIA\gamemodes\FL1-3.pwn(39194) : warning 213: tag mismatch
C:\Users\Usuario\Desktop\FLMIDIA\gamemodes\FL1-3.pwn(39196) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


3 Warnings.
Code:
stock GetVehicleHealthEx(vehicleid)
{
        new Float:health;
        GetVehicleHealth(vehicleid, health);

        if (health > 900.0)
		{
        return (health / 10.0); //linha 39194
        }
        else return ( health / 10.0 ) - (24);  // linha 39196
}
esse e outro warning o primeiro 217

Code:
    if(Flood[playerid] > GetTickCount())
__________________
Precisando de um Mapper ?
Então me procure, tem equipe ? so chamar
no momento estou sem

HostName : Equipe Futebol Samp
Servido : Testando
Criação : Estadio SF / Ponto de Encontro
GM : 95%
FS : 76%
deivid77 is offline   Reply With Quote
Old 23/11/2019, 05:18 PM   #2
Unsettled
Little Clucker
 
Unsettled's Avatar
 
Join Date: Nov 2019
Location: South American
Posts: 32
Reputation: 1
Default Re: Warning 213 e 217

´ Tenta ai..

Code:
new Flood[MAX_PLAYERS];
Code:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
	if(Flood[playerid] > GetTickCount())
	{
		SendClientMessage(playerid, -1, "Flood detectado. Por favor, aguarde.");
		return false;
	}
	return Flood[playerid] = GetTickCount() + 1000;
}
Code:
forward Float:GetVehicleHealthEx(vehicleid);
public Float:GetVehicleHealthEx(vehicleid)
{
	new Float:health;
	GetVehicleHealth(vehicleid, health);

	if(health > 900.0)
	{
		return health / 10.0;
	}
	else return (health / 10.0) - (24);
}
Unsettled is offline   Reply With Quote
Old 23/11/2019, 05:20 PM   #3
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 483
Reputation: 16
Default Re: Warning 213 e 217

PHP Code:
stock FloatGetVehicleHealthEx(vehicleid)
{
        new 
Float:health;
        
GetVehicleHealth(vehicleidhealth);

        if (
health 900.0)
        {
        return (
health 10.0); //linha 39194
        
}
        else return ( 
health 10.0 ) - (24);  // linha 39196

OBS: Uma função float deve ser colocada no início da gamemode, depois das definições e antes das callbacks.



if(Flood[playerid] > GetTickCount())

GetTickCount é retornado como inteiro, talvez "Flood" esteja definido como float.
NWDMadara is offline   Reply With Quote
Old 23/11/2019, 05:21 PM   #4
DelK
Huge Clucker
 
DelK's Avatar
 
Join Date: Apr 2017
Location: Brazil
Posts: 415
Reputation: 40
Default Re: Warning 213 e 217

Code:
stock Float:GetVehicleHealthEx(vehicleid)
{
        new Float:health;
        GetVehicleHealth(vehicleid, health);

        if (health > 900.0)
        {
            return health / 10.0; 
        }
        else return ( health / 10.0 )-(24); 
}
O
Code:
 if(Flood[playerid] > GetTickCount())
É um aviso de mal identação
__________________
DelK is offline   Reply With Quote
Old 23/11/2019, 07:51 PM   #5
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 483
Reputation: 16
Default Re: Warning 213 e 217

Quote:
Originally Posted by DelK View Post
[code]
Code:
 if(Flood[playerid] > GetTickCount())
É um aviso de mal identação
Confundistes com "Loose Identation"
NWDMadara is offline   Reply With Quote
Old 23/11/2019, 07:55 PM   #6
DelK
Huge Clucker
 
DelK's Avatar
 
Join Date: Apr 2017
Location: Brazil
Posts: 415
Reputation: 40
Default Re: Warning 213 e 217

Quote:
Originally Posted by NWDMadara View Post
Confundistes com "Loose Identation"
E não seria? Está no tópico ou entendi errado mesmo.

Code:
esse e outro warning o primeiro 217

Code:
    if(Flood[playerid] > GetTickCount())
__________________
DelK is offline   Reply With Quote
Old 23/11/2019, 09:33 PM   #7
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 483
Reputation: 16
Default Re: Warning 213 e 217

Atá, eu que li errado. Perdão
NWDMadara is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Warning 213: Tag mismatch and warning 202: number of arguments does not match definition ConnorG Scripting Help 5 12/01/2018 03:32 AM
[Ajuda] warning 217: loose indentation, warning 202: number of arguments does not match definition NATANGameron Português/Portuguese 7 05/04/2017 01:36 AM
warning (7784) : warning 202: number of arguments does not match definition b0b Scripting Help 3 08/06/2014 06:26 PM
warning 215: expression has no effect & warning 235: public function lacks forward declaration botak Scripting Help 4 27/12/2013 01:38 PM


All times are GMT. The time now is 10:22 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.