SA-MP Forums Archive
Text formating problem - 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: Text formating problem (/showthread.php?tid=436413)



Text formating problem - rAzvAn18 - 11.05.2013

Hello. I have a problem with this:

http://pastebin.com/eD6GWpFe

The code SOMETIMES stops after the "format" line. The parameters are OK, and the debug texts show the right values.

Sometimes don't work ....


Re: Text formating problem - OrMisicL - 11.05.2013

Because sometimes, the parameters passed to the format function exceeds the "test" variable size
If the "inputtext" parameter exceeds 30 characters, the format function will simply crash, try increasing the "test" variable size like:
pawn Код:
new test[128];



Re: Text formating problem - rAzvAn18 - 11.05.2013

The "test" variable is a Debug text, this debug text appear every time.


Re: Text formating problem - OrMisicL - 11.05.2013

Well, from what u said in the first post, sometimes it stops after the "format" function, then the only problem i can see in ur code is the one i mentioned above


Re: Text formating problem - rAzvAn18 - 11.05.2013

Ok, i will increase the string size. But this string: " RG %02d %s " Can't be bigger than 50 ....