26.01.2016, 14:24
Quote:
1. Use strcat instead of your strcopy stock. Your stock function is insanely slow compared to strcat.
Code:
str[0] = 0; strcat(dest, source); Code:
stock GetLYString(prefix,sufix,string[]){ new buffer[20]; if(prefix == 0){ format(buffer,sizeof(buffer),"%d",sufix); } else { format(buffer,sizeof(buffer),"%d%09d",prefix,sufix); } strcopy(buffer,string); } Code:
stock GetLYString(prefix,sufix,string[], len = sizeof(string)){ if(prefix == 0){ format(string, len, "%d", sufix); } else { format(string, len, "%d%09d", prefix, sufix); } } |
Current algorithm works in my script where players experience includes large numbers
http://i.imgur.com/mNNCTSz.png
However, if you have ideas that would be happy to see them.