string -
GoldZoroGrab - 14.12.2012
hey guys....
i have a simple quistion.....
For Example when i do the string[50];
it will only consider the %s bla bla bla bla bla
or it will consider %s as a string??
for examply my %s is for [5];
and i did %s bla bla bla bla bla
it will show all the bla bla bla bla and start country only the %s ?
for example the %s is MemoNada and string is [5];
it will show MemoN Bla Bla Bla Bla
or MemeN only??
sorry for my english...
Re: string -
Djole1337 - 14.12.2012
learn2english...
Re: string -
GoldZoroGrab - 14.12.2012
u chup, ur not here to say learn english, ur here to help me...
so....
Re: string -
Elysian` - 14.12.2012
Yes using [5] will only show MemoN as its 5 characters long. However..
If you done string[24] it'd show MemoN blah blah blah blah blah.
EDIT: I'm not to sure if it counts the spaces or not.. if it does it's 24, else, it's 19.
Re: string -
GoldZoroGrab - 14.12.2012
thanks bro
+rep
Re: string -
Lordzy - 14.12.2012
No it won't show or will pop out errors on debug screen.
pawn Код:
#define test "string"
new string[20]; //A string of cell size 20.
new nstr[5]; //A string of cell size 5.
format(string, sizeof(string), "THIS TEXT IS BIGGER THAN STRING SIZE 20 I GUESS. ISN'T IT? I DO HOPE |%s|", test);
SendClientMessageToAll(string); //This won't output well because the text is bigger than the string.
Adding more cell size than the format text won't occur any problem but smaller cell size can create problems.
Edit:late. :/
Re: string -
maramizo - 14.12.2012
If the string that's = %s, that's being inputted into the other string is 5, then it will be MemoN blablabla
However, if the other string, that contains the %s, is 5, then it would show MemoN.