Quote:
Originally Posted by ******
Why do you think it is slow? Why are you worried? Have you profiled your mode and found this to be a bottleneck?
|
I write the code just to see if it works. But it seems long because i create a lot of variables (i don't know if creating a lot of variables like above is needed?) and there're too much steps (strfind, strmid and strval) just to split one short string.
Quote:
Originally Posted by Calisthenics
Sscanf plugin: https://sampforum.blast.hk/showthread.php?tid=570927
Download: https://github.com/maddinat0r/sscanf/releases
pawn Код:
new _money[] = "21.99", cash, coin; sscanf(_money, "dd", cash, coin); printf("money: %s, cash: %d, coin: %d", _money, cash, coin);
|
Thank you, this looks shorter (and less variables and may be faster?) than mine.