Quote:
Originally Posted by ProIcons
just any?
any:...
|
That means extra arguments are not limited to a specific tag.
If "..." was only put there, compiler wouldn't let Float (for example) to be passed.
Example:
Code:
#include < amxmodx >
public plugin_init( )
{
new Float:flValue;
test( "%f", flValue );
}
test( format[], ... )
{
new message[ 192 ]
vformat( message, 191, format, 2 )
server_print( "%s", message )
}
That would give a tag mismatch error.
Code:
#include < amxmodx >
public plugin_init( )
{
new Float:flValue;
test( "%f", flValue );
}
test( format[], {Float,_}:... )
{
new message[ 192 ]
vformat( message, 191, format, 2 )
server_print( "%s", message )
}
That allows Floats and untagged variables to be passed.
Code:
#include < amxmodx >
public plugin_init( )
{
new Float:flValue;
test( "%f", flValue );
}
test( format[], any:... )
{
new message[ 192 ]
vformat( message, 191, format, 2 )
server_print( "%s", message )
}
That allows variables of all tags to be passed.
__________________