SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 11/05/2013, 12:03 PM   #1
rAzvAn18
Big Clucker
 
Join Date: Sep 2011
Posts: 66
Reputation: 0
Default Text formating problem

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 ....
rAzvAn18 is offline   Reply With Quote
Old 11/05/2013, 12:35 PM   #2
OrMisicL
Big Clucker
 
OrMisicL's Avatar
 
Join Date: Mar 2013
Location: Under the bed
Posts: 99
Reputation: 191
Default Re: Text formating problem

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 Code:
new test[128];
OrMisicL is offline   Reply With Quote
Old 11/05/2013, 12:36 PM   #3
rAzvAn18
Big Clucker
 
Join Date: Sep 2011
Posts: 66
Reputation: 0
Default Re: Text formating problem

The "test" variable is a Debug text, this debug text appear every time.
rAzvAn18 is offline   Reply With Quote
Old 11/05/2013, 12:42 PM   #4
OrMisicL
Big Clucker
 
OrMisicL's Avatar
 
Join Date: Mar 2013
Location: Under the bed
Posts: 99
Reputation: 191
Default Re: Text formating problem

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
OrMisicL is offline   Reply With Quote
Old 11/05/2013, 04:31 PM   #5
rAzvAn18
Big Clucker
 
Join Date: Sep 2011
Posts: 66
Reputation: 0
Default Re: Text formating problem

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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
formating dialog ajwar Help Archive 1 13/08/2011 10:53 AM
Formating MySQL Raimis_R Help Archive 4 18/11/2010 03:46 PM
Dialog and formating text Doman Help Archive 5 19/05/2010 08:37 PM


All times are GMT. The time now is 01:53 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.