View Single Post
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 10-16-2015 , 16:55   Re: Multi-Mod Manager v1.0-release_candidate2.hotfix2
Reply With Quote #5

Thank you for you time.

Quote:
Originally Posted by fysiks View Post
You should never return a string from a function. Strings should always be passed by-ref with the max characters
passed as another parameter. Then, in the function, you would either format directly into that string using the size
provided or use copy().
Coming soon: mapCyclePathCoder( stringToCode, sizeof( stringToCode ) - 1, stringCoded )

Quote:
Originally Posted by fysiks View Post
Don't pass an integer value to a function by putting it in a string. Just pass the integer. E.g. msgResourceActivated().
If the original source of the value is from a string like read_argv() then you should convert it to an integer before
passing it to a function like primitiveFunctions().
Yea, I should convert it to integer.

Quote:
Originally Posted by fysiks View Post
If you are going to use the multilingual system to print to the server console, you should not use
LANG_PLAYER; that just doesn't make sense. You should use LANG_SERVER.[*]This will only work with Counter-Strike (because of color chat) and thus your submission
should not be labeled as "Modification: ALL".
I posted wrong, and I was misleading the LANG_PLAYER and LANG_SERVER's use.
It will be fixed. And I forgot, this will be modification ALL, but it is not currently modification ALL.
It will be correct at threads page until it is definitely modification all.

Quote:
Originally Posted by fysiks View Post
Your code needs to be in English (this is a rule for plugin submissions).
It is just a variable (used a lot), and more 4 or 5. Despite that, all the code is 100% documented in english,
hence such thing would not be a problem, and some similar english variables names at a fully documented code, is a much way better than a zero documented code.
But, no worries, I will do a replace.

Quote:
Originally Posted by fysiks View Post
You should use a switch() in configureMultimod() instead of conditionals because all three
cases are mutually exclusive. The third case can be the "default" case.
This was my fail, I literally implemented a switch, instead of using a switch.

Quote:
Originally Posted by fysiks View Post
IIRC, printing info to the client in a for loop can cause an overflow. Simply build the whole text into
a single string and then send that only once. You can create multiple lines by using "^n".
It is the same problem as the AMXX very own "adminhelp.sma". I cannot build I a big string as pawn is limited.
I must limit the output number as "adminhelp.sma", receiving a page list number to show and limit
each page to show only a big string supported.

Quote:
Originally Posted by fysiks View Post
The use of server_print() should be rare and mostly for debugging. For registered commands,
it should only be used with register_srvcmd() (unless it's for debugging of course).
I did not know this register_srvcmd(). Then now I can register a register_srvcmd to server_print, and another register_clcmd to client_print.

Quote:
Originally Posted by fysiks View Post
I'm sure there is more but I am done for now.
Of course, there is more clever programing techniques to learn:
  1. use tries instead of g_modShortName.
  2. count better current playing player at playersPlaying.
  3. copy more efficiently a files at copyFiles and copyFiles2.
  4. print colored text more efficiently than at print_color.
  5. receive commands more efficiently than "command arg1 arg2" even a for 1 argument command.

Quote:
Originally Posted by fysiks View Post
Quote:
Originally Posted by addons_zz View Post
And even better, server's admins with right flag can change the server's current mod without needing direct access like ftp, to the server's files.
lol This is not special. It's just a consequence of doing this sort of thing and can be done with both Polymorph and Joropito's MultiMod (afaik).
You are absolutely right. This can be achieved with both fysiks' Polymorph and Joropito's MultiMod.
You both can update your's threads with this information. Hence sorry, I forgot to elaborate a basics diferences table.
Then this cannot be just a sort of things, it took me a lot time effort's to develop,
as its code now seen, my goal is to develop maintainable code, for example, it is completely documented.
Nowadays prefer to do adaptive maintenance modifying the system to scope with changes in the software environment.

Last edited by addons_zz; 10-16-2015 at 16:58.
addons_zz is offline