Per player string
#1

Would it be efficient to have a per player string when using dialogs instead of declaring a new string in each function?
For example; PlayerInfo[playerid][dialogText].

Then showing the contents with the variable.
Reply
#2

Yeah.
Reply
#3

Have you used the profiler plugin? Premature optimization is the root of all evil.
Reply
#4

Quote:
Originally Posted by Vince
Посмотреть сообщение
Have you used the profiler plugin? Premature optimization is the root of all evil.
- Donald Knuth


Something I always say: computers are faster, we have more memory, why are you so worried about this? This was an BIG PROBLEM some years ago, but not now (yes, it doesn't mean you can be careless*).

And no, global variables are not good practice most of the time. They can be a serious problem when handling concurrency problems. Use local variables when possible, they will be in the stack and cleanead after the function ends. Have fun.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)