Thread: CS:GO Music Kit
View Single Post
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-14-2016 , 11:10   Re: CS:GO Music Kit
Reply With Quote #12

Quote:
Originally Posted by hellmonja View Post
I know how you guys hate hardcoding but I had to hardcode variable sounds' character length for now. When I use charmax() is gives me errors. (line 237)
I just used charsmax and compiles. Note, you used the sound as sound[40], and when formatting it:
Code:
formatex(sound, 40, "%s%s", FOLDER[iFolder], WONROUND);
It is not 40, it is 39 because one last space is used always as '^0' to determine the end of the string.
40 is also a little to critic, because you are using things bigger as 38 chars, them it almost do not fit in.
And as it is supposed in the future let the users to configure the sounds by config files, would be nice to allow
them to write paths as big as 96 or 128 characters length.

Spoiler
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 07-19-2016 at 20:56. Reason: update boring
addons_zz is offline