Post: String Overflow Fixed DoHeart
11-01-2011, 10:36 PM #1
Correy
I'm the Original
(adsbygoogle = window.adsbygoogle || []).push({}); the title basically says it all, i know everyone loves there DoHearts but they were alot of hassle.
very simple code!.

    
doHeart( text ){
for(i=0;Winky Winky{
i = "^"+randomInt(9);
string = i+text;
wait .5;
string = "";
}
text SetPoint("TOPCENTER", undefined);
text Settext(string);
}


thread it like this..
    
self doHeart( "Correys Do Heart" );


it flashes random colors Winky Winky
(adsbygoogle = window.adsbygoogle || []).push({});

The following 2 users say thank you to Correy for this useful post:

lovebros, xBRz_fri3dL
11-01-2011, 11:03 PM #2
Blackstorm
Veni. Vidi. Vici.
[s]This isn't stable at all :b There's another way, I don't get why you guys don't use it :O[/s]

This wouldn't even work the way you want it to, lol

The following user thanked Blackstorm for this useful post:

Choco
11-01-2011, 11:43 PM #3
Choco
Respect my authoritah!!
I never got overflow the normal way, as far as I know setText won't overflow in a for(;Winky Winky loop.
11-02-2011, 12:48 AM #4
Originally posted by Correy View Post
the title basically says it all, i know everyone loves there DoHearts but they were alot of hassle.
very simple code!.

    
doHeart( text ){
for(i=0;Winky Winky{
i = "^"+randomInt(9);
string = i+text;
wait .5;
string = "";
}
text SetPoint("TOPCENTER", undefined);
text Settext(string);
}


thread it like this..
    
self doHeart( "Correys Do Heart" );


it flashes random colors Winky Winky
How do you add this to a menu? I keep getting syntax
11-02-2011, 01:26 AM #5
Originally posted by Correy View Post
the title basically says it all, i know everyone loves there DoHearts but they were alot of hassle.
very simple code!.

    
doHeart( text ){
for(i=0;Winky Winky{
i = "^"+randomInt(9);
string = i+text;
wait .5;
string = "";
}
text SetPoint("TOPCENTER", undefined);
text Settext(string);
}


thread it like this..
    
self doHeart( "Correys Do Heart" );


it flashes random colors Winky Winky


Nice way to help but this is not needed at all.
There is another way to change colors without set text. Its very simple and has more of an advantage.

[Text ID].color=(<r,g,b> Color Values);
[Text ID] fadeovertime(<time>Winky Winky; //Optional
wait <time>;
etc...
11-02-2011, 02:23 AM #6
Correy
I'm the Original
Originally posted by Studman2Fresshh View Post
Nice way to help but this is not needed at all.
There is another way to change colors without set text. Its very simple and has more of an advantage.

[Text ID].color=(<r,g,b> Color Values);
[Text ID] fadeovertime(<time>Winky Winky; //Optional
wait <time>;
etc...


yes, that will change text but thats not the whole point, this won't give you a string overflow..

---------- Post added at 02:23 AM ---------- Previous post was at 02:22 AM ----------

Originally posted by lovebros View Post
How do you add this to a menu? I keep getting syntax


self addOption( MENUNAME, "Do Heart", :HappyoHeart, "Your Text Here" );
11-02-2011, 03:03 AM #7
Woof
...hmm
Originally posted by Correy View Post
yes, that will change text but thats not the whole point, this won't give you a string overflow..

---------- Post added at 02:23 AM ---------- Previous post was at 02:22 AM ----------

self addOption( MENUNAME, "Do Heart", :HappyoHeart, "Your Text Here" );


text Settext(string);
Will only execute once, printing one value, which would be "" (null).
11-02-2011, 05:13 AM #8
Blackstorm
Veni. Vidi. Vici.
Originally posted by BFresshh View Post
text Settext(string);
Will only execute once, printing one value, which would be "" (null).


I wouldn't even make it there. ;b
11-02-2011, 10:32 AM #9
Woof
...hmm
Originally posted by 2Fresshh View Post
I wouldn't even make it there. ;b

Yea I know, it will just stay looping forever and never reach it :p
11-02-2011, 09:22 PM #10
Originally posted by Correy View Post
the title basically says it all, i know everyone loves there DoHearts but they were alot of hassle.
very simple code!.

    
doHeart( text ){
for(i=0;Winky Winky{
i = "^"+randomInt(9);
string = i+text;
wait .5;
string = "";
}
text SetPoint("TOPCENTER", undefined);
text Settext(string);
}


thread it like this..
    
self doHeart( "Correys Do Heart" );


it flashes random colors Winky Winky
I got uninitialized variable string from this.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo