remiX, on 03 April 2013 - 01:03 AM, said:
How to make a word with two changing colors
Started by SuicidalSTDz, Apr 02 2013 03:23 AM
31 replies to this topic
#21
Posted 12 April 2013 - 01:58 PM
Why not rainbow text!
#22
Posted 14 April 2013 - 09:35 AM
I have an Error: "Color:8: Colour not supported"
My Code:
My Code:
[color=#000088]local[/color][color=#000000] word [/color][color=#666600]=[/color][color=#000000] [/color][color=#008800]"Insert your word here "[/color][color=#000000] [/color][color=#666600]--[/color][color=#660066]Leave[/color][color=#000000] one space so the cursor doesnt obscure the word [/color][color=#000088]local[/color][color=#000000] firstCol [/color][color=#666600]=[/color][color=#000000] colours[/color][color=#666600].[/color][color=#000000]red [/color][color=#000088]local[/color][color=#000000] secondCol [/color][color=#666600]=[/color][color=#000000] colours[/color][color=#666600].[/color][color=#000000]blue [/color][color=#000088] for[/color][color=#000000] len [/color][color=#666600]=[/color][color=#000000] [/color][color=#006666]1[/color][color=#666600],[/color][color=#880000]#word do[/color] [color=#000000] [/color][color=#000088]if[/color][color=#000000] bit[/color][color=#666600].[/color][color=#000000]band[/color][color=#666600]([/color][color=#000000]len[/color][color=#666600],[/color][color=#006666]1[/color][color=#666600])[/color][color=#000000] [/color][color=#666600]==[/color][color=#000000] [/color][color=#006666]0[/color][color=#000000] [/color][color=#000088]then[/color][color=#000000] [/color][color=#666600]--[/color][color=#660066]This[/color][color=#000000] line will detect [/color][color=#000088]if[/color][color=#000000] the current [/color][color=#000088]char[/color][color=#000000] [/color][color=#000088]is[/color][color=#000000] on an odd [/color][color=#000088]or[/color][color=#000000] even column[/color][color=#666600].[/color][color=#000000] [/color][color=#660066]Odd[/color][color=#000000] will be red [/color][color=#000088]and[/color][color=#000000] [/color][color=#660066]Even[/color][color=#000000] will be blue [/color][color=#000088]in[/color][color=#000000] [/color][color=#000088]this[/color][color=#000000] [/color][color=#000088]case[/color] [color=#000000] term[/color][color=#666600].[/color][color=#000000]setTextColour[/color][color=#666600]([/color][color=#000000]firstCol[/color][color=#666600])[/color] [color=#000000] [/color][color=#000088]else[/color] [color=#000000] term[/color][color=#666600].[/color][color=#000000]setTextColour[/color][color=#666600]([/color][color=#000000]secondCol[/color][color=#666600])[/color] [color=#000000] [/color][color=#000088]end[/color] [color=#000000] term[/color][color=#666600].[/color][color=#000000]write[/color][color=#666600]([/color][color=#000088]string[/color][color=#666600].[/color][color=#000088]sub[/color][color=#666600]([/color][color=#000000]word[/color][color=#666600],[/color][color=#000000]len[/color][color=#666600],[/color][color=#000000]len[/color][color=#666600]))[/color][color=#000000] [/color][color=#666600]--[/color][color=#660066]Sub[/color][color=#000000] the [/color][color=#000088]string[/color][color=#000000] to the current character [/color][color=#000088]end[/color]Could anyone Help?
#23
Posted 14 April 2013 - 11:31 AM
Are you using a non-advanced computer?
#24
Posted 14 April 2013 - 03:14 PM
^
He has to be, since that is the only way he can get that error, but nice tutorial!
He has to be, since that is the only way he can get that error, but nice tutorial!
#26
Posted 15 April 2013 - 06:23 AM
I was using a Normal Computer. Also awesome Tutorial!
#27
Posted 15 April 2013 - 06:38 AM
Are you Supposed to enter your own Word?
This is what happen's for Me:
This is what happen's for Me:
#28
Posted 15 April 2013 - 06:43 AM
You must change the string in the word variable to your own word:
local word = "Test " --Leave one space so the cursor doesnt obscure the word
#29
Posted 15 April 2013 - 06:49 AM
Ah okay. Thank's!
#31
Posted 15 April 2013 - 05:19 PM
Spongy141, on 15 April 2013 - 05:11 PM, said:
Looks like you shovel and sword are about to break... you might want to repair them. 
local function foo() if yourAttentionToDetails > myAttentionSpan then return true else return false end end local ok,err = pcall(foo) if not ok then print(err) end >attempt to compare number to nilSee what I did there
#32
Posted 15 April 2013 - 05:23 PM
^
Lol
Lol
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











