Home
Resources
Latest reviews
Search resources
Forums
New posts
Search forums
Members
Current visitors
New profile posts
Search profile posts
What's new
New posts
New resources
New profile posts
Latest activity
Rules
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Community
Spammm
[Fixed] Problem - memory
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="ajom" data-source="post: 93808" data-attributes="member: 56907"><p>What do you use to read existing text? This following opcodes is limited to 127 characters:</p><p>[CODE]</p><p>0ACC: show_text_lowpriority "im limited to 127 characters" time 1000</p><p>0ACD: show_text_highpriority "im limited to 127 characters" time 1000</p><p>0AD0: show_formatted_text_lowpriority "im limited to %d characters" time 2000 127</p><p>0AD1: show_formatted_text_highpriority "im limited to %d characters" time 2000 127</p><p>[/CODE]</p><p></p><p>With SAMPFUNCS if it was just troubleshooting I will show the message in the chatbox since SAMPFUNCS opcode <strong>0AF8 </strong>and <strong>0C8F</strong> automatically trims the message to 127 characters.</p><p>[CODE]</p><p>say "im safe to use :)"</p><p>0AF8: samp add_message_to_chat "im safe to use :)" color 0xFF00FF00</p><p>[/CODE]</p><p></p><p></p><p>I made tests on how many characters some opcodes can show so that Im confident on my statements above:</p><p>[CODE]{$CLEO .cs}</p><p>0000: gxt examiner</p><p></p><p>alloc 31@ 1024</p><p></p><p>while true</p><p></p><p> // empty message</p><p> 0085: 30@ = 31@ // store the 240 allocated bytes pointer</p><p> for 0@ = 1 to 256</p><p> 0A8C: write_memory 30@ size 4 value 0 virtual_protect 0</p><p> 30@ += 4</p><p> end</p><p> //</p><p></p><p> 0085: 30@ = 31@ // store the 240 allocated bytes pointer</p><p> for 0@ = 1 to 1023</p><p> wait 50</p><p> 0A8C: write_memory 30@ size 1 value 97 virtual_protect 0 // acii a</p><p> 30@++</p><p> 0ACD: show_text_highpriority 31@ time 250 // can show max of 127 characters // crashes when reaching 128 characters</p><p> // 0ACC: show_text_lowpriority 31@ time 250 // can show max of 127 characters // crashes when reaching 128 characters</p><p> // 0AD1: show_formatted_text_highpriority "%s" time 250 31@ // can show max of 127 characters // crashes when reaching 128 characters</p><p> // 0AD0: show_formatted_text_lowpriority "%s" time 250 31@ // can show max of 127 characters // crashes when reaching 128 characters</p><p> // 0AF8: samp add_message_to_chat 31@ color -1 // does not crash even trying to show 1024 number of characters, that explains because the message was trimmed into 127 characters</p><p> // say 31@ // does not crash even trying to show 1024 number of characters, that explains because the message was trimmed into 127 characters</p><p> 0AD1: show_formatted_text_highpriority "showed Char Count: %d" time 250 0@</p><p> end</p><p></p><p>end[/CODE]</p><p>You can try it to see how it behaves.</p></blockquote><p></p>
[QUOTE="ajom, post: 93808, member: 56907"] What do you use to read existing text? This following opcodes is limited to 127 characters: [CODE] 0ACC: show_text_lowpriority "im limited to 127 characters" time 1000 0ACD: show_text_highpriority "im limited to 127 characters" time 1000 0AD0: show_formatted_text_lowpriority "im limited to %d characters" time 2000 127 0AD1: show_formatted_text_highpriority "im limited to %d characters" time 2000 127 [/CODE] With SAMPFUNCS if it was just troubleshooting I will show the message in the chatbox since SAMPFUNCS opcode [B]0AF8 [/B]and [B]0C8F[/B] automatically trims the message to 127 characters. [CODE] say "im safe to use :)" 0AF8: samp add_message_to_chat "im safe to use :)" color 0xFF00FF00 [/CODE] I made tests on how many characters some opcodes can show so that Im confident on my statements above: [CODE]{$CLEO .cs} 0000: gxt examiner alloc 31@ 1024 while true // empty message 0085: 30@ = 31@ // store the 240 allocated bytes pointer for 0@ = 1 to 256 0A8C: write_memory 30@ size 4 value 0 virtual_protect 0 30@ += 4 end // 0085: 30@ = 31@ // store the 240 allocated bytes pointer for 0@ = 1 to 1023 wait 50 0A8C: write_memory 30@ size 1 value 97 virtual_protect 0 // acii a 30@++ 0ACD: show_text_highpriority 31@ time 250 // can show max of 127 characters // crashes when reaching 128 characters // 0ACC: show_text_lowpriority 31@ time 250 // can show max of 127 characters // crashes when reaching 128 characters // 0AD1: show_formatted_text_highpriority "%s" time 250 31@ // can show max of 127 characters // crashes when reaching 128 characters // 0AD0: show_formatted_text_lowpriority "%s" time 250 31@ // can show max of 127 characters // crashes when reaching 128 characters // 0AF8: samp add_message_to_chat 31@ color -1 // does not crash even trying to show 1024 number of characters, that explains because the message was trimmed into 127 characters // say 31@ // does not crash even trying to show 1024 number of characters, that explains because the message was trimmed into 127 characters 0AD1: show_formatted_text_highpriority "showed Char Count: %d" time 250 0@ end end[/CODE] You can try it to see how it behaves. [/QUOTE]
Name
Verification
Name a popular topic discussed in the ugbase.eu community
Post reply
Home
Forums
Community
Spammm
[Fixed] Problem - memory
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top