Optional enumerators - sscanf
#4

Quote:
Originally Posted by Gammix
Посмотреть сообщение
You should have 3 values there:
Код:
"E<ii-i-i>(20,30,40)"
Because you are updating the first 2 and the last parts of the enum, and remain the 3rd untouched. So sscanf require 3 default values.

You can read this page if you haven't or re-read: https://sampforum.blast.hk/showthread.php?tid=570927
I did, but still prints, "1-2-0-0".

pawn Код:
enum tranquilos
{
    valor_1,
    valor_2,
    valor_3,
    valor_4
};
new quiet_enum[tranquilos];

// The problem is that the default values are not read.
sscanf("1 2 3 4", "E<ii-i-i>(20, 30, 40)", quiet_enum);
    printf("%i value 1", quiet_enum[valor_1]);
    printf("%i value 2", quiet_enum[valor_2]);
    printf("%i value 3", quiet_enum[valor_3]);
    printf("%i value 4", quiet_enum[valor_4]);
You can try if you want.
Reply


Messages In This Thread
Optional enumerators - sscanf - by GranaT3 - 02.11.2015, 13:15
Respuesta: Optional enumerators - sscanf - by GranaT3 - 03.11.2015, 01:21
Re: Optional enumerators - sscanf - by Gammix - 03.11.2015, 03:34
Respuesta: Re: Optional enumerators - sscanf - by GranaT3 - 03.11.2015, 11:35
Respuesta: Optional enumerators - sscanf - by GranaT3 - 03.11.2015, 22:01

Forum Jump:


Users browsing this thread: 1 Guest(s)