Question about YSI
#7

Use notepad++. It shows length of the text. Alternatively, if you have this string: "Your ID is %d!", and your max playerID is 150 and thus 5 characters lang, you could do this:
Code:
new string[] = "Your ID is XXX!";
That way the compiler sets the array size and you don't have to count. However that's inconvenient especially when the inputs can be long. Otherwise, such a thing is not possible afaik (unless when using the dynamic memory plugin)

You keep coming up with string lengths and y_va. va stands for varargs. It's a library that provides va_printf() and va_format(), using a system to easily use multiple undefined parameters. The alternative would be using "..." and functions such as getarg() and numargs(). It doesn't have anything to do with counting the length of a string.
Reply


Messages In This Thread
Question about YSI - by MarianImmortalGod - 03.07.2020, 15:09
Re: Question about YSI - by MarianImmortalGod - 03.07.2020, 21:22
Re: Question about YSI - by Kwarde - 04.07.2020, 12:13
Re: Question about YSI - by MarianImmortalGod - 04.07.2020, 12:34
Re: Question about YSI - by Kwarde - 04.07.2020, 21:47
Re: Question about YSI - by MarianImmortalGod - 04.07.2020, 22:19
Re: Question about YSI - by Kwarde - 04.07.2020, 22:54
Re: Question about YSI - by MarianImmortalGod - 04.07.2020, 23:59

Forum Jump:


Users browsing this thread: 1 Guest(s)