_: is not needed there.
I don't know much about that and I badly explain but in Pawn you can use structs like in C with an enum. The way you use in your code is a struct of severals float vars.
An enum is a list of possible value for a variable.
A struct is a list of different sub-variables ( bool, float, integer, array or custom tags ) for variables.
A simple basic enum :
Code:
enum Mood
{
HAPPY,
ANNOYED,
DRUNK,
ENERGETIC,
ALONE
}
public MyFunction ( const User )
{
new Mood:UserMood = GetUserMood( User );
if ( UserMood == DRUNK )
{
// Blabla.
}
}
Mood:GetUserMood( const User )
{
return HAPPY;
}
Now, a basic structs :
Code:
enum Rectangle
{
Left,
Top,
Right,
Bottom
};
new MyRec[ Rectangle ];
MyFunction()
{
MyRec[ Left ] = 10;
MyRec[ Top ] = 5;
MyRec[ Right ] = 12;
MyRec[ Bottom ] = 8;
}
A struct with differents types :
Code:
const MAX_CLIENTS = 32;
enum PlayerData
{
bool:IsAlive,
Float:TotalTime,
UserName[ 32 ],
Health,
Mood:CurrentMood
};
new PData[ MAX_CLIENTS + 1 ][ PlayerData ];
public MyFunction2 ( const Player )
{
new Name[ 32 ];
get_user_name( Player, Name, 31 );
PData[ Player ][ IsAlive ] = true;
PData[ Player ][ TotalTime ] = _:100.5;
PData[ Player ][ Health ] = 50;
PData[ Player ][ CurrentMood ] = _:ANNOYED;
copy( PData[ Player ][ UserName ], 31, Name );
}
I've used _: to remove the tag since PData has no tag otherwise you will get a tag mismatch.
So, it works for you because it's a struct of float sub-variables. Since all are float you can tag the var as float too like you have done and then no need to detag when you set a float value.
You can get more informations in the Pawn guide ( .pdf ) you can found on the wiki.
__________________