Question about strings
#1

Hello sa-mp forum!

I just thinking about strings.. so my question is: How to calculate every single character in strings, but not only whole text.. see example.

pawn Код:
stock ShowInfoBox(id, text[])
{
    new info[500]; //Calculate characters in string + text[]... instead of info[500]..
    format(info, sizeof(info), "%s~n~~n~~w~for close this use /ib", text);
    PlayerTextDrawSetString(id, ShadInfoBox[id], info);
    return 1;
}
Thanks for advice!
Reply
#2

meaningless and useless question I guess
Reply
#3

Why, i think it will be more efficient.
Reply
#4

All array sizes must be know at compile time. You cannot use dynamic arrays in Pawn.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)