View Single Post
Old 10/12/2016, 02:53 PM   #3587
Logic_'s Avatar
Join Date: Jun 2015
Location: Next to Oblivion (Kalcor's place)
Posts: 1,337
Reputation: 236
Default Re: Little coding questions - For general minor queries 5

Originally Posted by PrO.GameR View Post
Directly returning strings as a function result have caused me so many problems before, specially when working alongside enums, I suggest you to make a local string in the function, use strcat to concat the name to it, and then return that local string.
I did this way before you replied and it worked. Thanks anyways.

Originally Posted by Hansrutger View Post
Same in my case, I cannot explain why though. :/
Check my above reply.

Originally Posted by Sreyas View Post
thats a bad coding don't do like that.Why to provide extra overhead while it is accessible directly? Keep the code optmised as possible.
Easier to write for me and optimization is not really needed everywhere or in this case, this code. Making the array const would make it faster as well as I guess?

Current projects
Roleplay scripts and San Andreas Battle Royale
Providing SA-MP, G-MOD, Web hosting and Hosted tab listing for cheap @
Logic_ is offline   Reply With Quote