Which is better?
#5

Quote:
Originally Posted by ******
Посмотреть сообщение
No, you still have too many dimensions - why do you need the string in a single-element slot?
Right, I know I'm not the original poster of this, but now you've indeed intrigued me. Have I been doing this wrong for all these years?
What's the other option, because as far as I see it, other than packing the string, there's not much else that can be done.

Obviously, if we're talking about 2 strings in the array, I would not even make an array, where I'd rather resort to an if statement or ternary operator, but in a case of 50 or 100 random messages?

EDIT:

Oh, interesting... I have been doing this wrong all this time. Would've thought that if I was doing it wrong, the compiler might've said anything about the array dimensions not matching or any other weird behaviour happening.

pawn Код:
new const func[][] =
{
 "Text example",
 "Text example 2"
};
Reply


Messages In This Thread
Which is better? - by BlasterDev - 03.10.2018, 16:19
Re: Which is better? - by BlasterDev - 03.10.2018, 16:37
Re: Which is better? - by [WSF]ThA_Devil - 03.10.2018, 17:00
Re: Which is better? - by SaMuRy - 03.10.2018, 17:11
Re: Which is better? - by [WSF]ThA_Devil - 03.10.2018, 17:20
Re: Which is better? - by Nero_3D - 04.10.2018, 02:25

Forum Jump:


Users browsing this thread: 1 Guest(s)