SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 30/06/2020, 11:52 AM   #1
IZenta
Little Clucker
 
Join Date: Jan 2020
Location: Indonesia
Posts: 43
Reputation: 16
Default I got warning how to fix it?

PHP Code:
warning 213tag mismatchexpected tag none ("_"), but found "Float" 
PHP Code:
enum
{
    
ITEM_TYPE_HELMET
    
ITEM_TYPE_BODY
    
ITEM_TYPE_BACKPACK
    
ITEM_TYPE_MELEEWEAPON
    
ITEM_TYPE_GUN
    
ITEM_TYPE_WEAPON
    
ITEM_TYPE_AMMO
    
ITEM_TYPE_MEDIC,
    
ITEM_TYPE_FOOD,
    
ITEM_TYPE_DRINK,
    
ITEM_TYPE_OTHER

PHP Code:
enum CharData
{
    
charSlot[MAX_CHARACTER_SLOT], 
    
Float:charDurability[MAX_CHARACTER_SLOT], 
    
charWeaponSlot[2]
}
new 
CharInfo[MAX_PLAYERS][CharData]; 
And the warning is here:
PHP Code:
CharInfo[playerid][charDurability][ITEM_TYPE_HELMET] = durability
__________________
Discord: ZTzTopia#0001
IZenta is offline   Reply With Quote
Old 30/06/2020, 12:05 PM   #2
Kwarde
High-roller
 
Kwarde's Avatar
 
Join Date: Nov 2009
Location: The Netherlands
Posts: 2,713
Reputation: 1671
Default Re: I got warning how to fix it?

ITEM_TYPE_HEALTH expects to be an integer (or rather, a value with no tag / underscore tag).
durability is a floating number. Tag ITEM_TYPE_HEALTH with Float.
__________________
When the opportunity presents itself to flip-a da table, uh, you flip-a da table.

Discord: Kwarde#1966
Kwarde is offline   Reply With Quote
Old 30/06/2020, 01:36 PM   #3
IZenta
Little Clucker
 
Join Date: Jan 2020
Location: Indonesia
Posts: 43
Reputation: 16
Default Re: I got warning how to fix it?

Quote:
Originally Posted by Kwarde View Post
ITEM_TYPE_HEALTH expects to be an integer (or rather, a value with no tag / underscore tag).
durability is a floating number. Tag ITEM_TYPE_HEALTH with Float.
wtf is this ITEM_TYPE_HEALTH? xd xd
ok is work thank.
__________________
Discord: ZTzTopia#0001
IZenta is offline   Reply With Quote
Old 30/06/2020, 02:18 PM   #4
Kwarde
High-roller
 
Kwarde's Avatar
 
Join Date: Nov 2009
Location: The Netherlands
Posts: 2,713
Reputation: 1671
Default Re: I got warning how to fix it?

Yes, I just got out of bed and didn't have enough coffee yet ;P HEALTH obviously should had been HELMET
__________________
When the opportunity presents itself to flip-a da table, uh, you flip-a da table.

Discord: Kwarde#1966
Kwarde 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 02:32 AM
[Ajuda] warning 217: loose indentation, warning 202: number of arguments does not match definition NATANGameron Português/Portuguese 7 05/04/2017 12:36 AM
warning (7784) : warning 202: number of arguments does not match definition b0b Scripting Help 3 08/06/2014 05:26 PM
warning 215: expression has no effect & warning 235: public function lacks forward declaration botak Scripting Help 4 27/12/2013 12:38 PM
[warning]como tira esse warning?? syslogg Português/Portuguese 3 06/01/2011 12:59 AM


All times are GMT. The time now is 05:48 AM.


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