26.01.2016, 08:03
1. Use strcat instead of your strcopy stock. Your stock function is insanely slow compared to strcat.
2.
What is the point of using format then strcopy?
Actually, the include can be rewritten using assembly/bitwise operations using a different algorithm of combining two cells into one. And a long var can be declared using tag, "new Long:number" (using defines, you can change that to new _long:number, _long:numberMS, _long:numberLS). One can even overload operators to carry out the basic operations on these number. I might work on this sometime in future.
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); } }