SA-MP Forums Archive
[QUESTION] Special Numerals - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: [QUESTION] Special Numerals (/showthread.php?tid=192490)



[QUESTION] Special Numerals - viKKmaN - 22.11.2010

Hy. I am looking for a type of numerals that given any addition between themselves, you never get the same result twice.
Trying to use them as unique identifiers for a 'shopping cart' project.
And i want to be able to tell what the user bought by the sum of all the ids of the products he purchased.

EX:
5 - Shampoo
7 - Soap
11 - Toothpaste

5+7=12 => Shampoo & Soap
5+11=16 => Shampoo & Toothpaste
7+11=18 => Soap & Toothpaste

Anyone got the full list of all those numbers, or atleast a link?


Re: [QUESTION] Special Numerals - Finn - 22.11.2010

YSI contains y_bit include which makes this kind of stuff easy.


Re: [QUESTION] Special Numerals - viKKmaN - 22.11.2010

I never said it was for sa-mp. That's why i posted here in 'Everything and Nothing'.


Re: [QUESTION] Special Numerals - Finn - 22.11.2010

Sorry about that, didn't notice it.

1 2 4 8 16 32 64 128...

x*2

Edit: Actually there might be more of 'em between, but those numbers are in the list fo' sho'.


Re: [QUESTION] Special Numerals - viKKmaN - 22.11.2010

Thank you.