Question about strings - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Question about strings (
/showthread.php?tid=490174)
Question about strings -
Jacapo - 25.01.2014
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!
Re: Question about strings -
Vanter - 25.01.2014
meaningless and useless question I guess
Re: Question about strings -
Jacapo - 25.01.2014
Why, i think it will be more efficient.
Re: Question about strings -
Vince - 25.01.2014
All array sizes must be know at compile time. You cannot use dynamic arrays in Pawn.