|
| 22 Nov 2011 06:00 PM |
Hey, can any of you help with this script I am making?
It keeps saying, "String Expected", but I don't know how to make a string (yes, I HAVE read Wiki but I still don't understand).
local h = Instance.new "Hint" h.Name = CountDownMessage h.Parent = game.Workspace h.Text = ""
wait (0.1)
for i=1,300 -1 do
h.Text = ...(i) "seconds left!"
end
Can someone fix the problem (probably by adding a string somewhere)? I can't do that yet, it would be helpful to have a working script that I can use and look at to learn strings! Thanks. |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 06:03 PM |
h.Text = i.."seconds left!" |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 07:06 PM |
| Doesn't work, still says 'String Expected' |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 07:11 PM |
for i = 300, 1, -1 do wait(1) h.Text=(i.." seconds left!") end |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 22 Nov 2011 08:03 PM |
| Still says, 'String Expected.' |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 08:04 PM |
Doing a loop like that isn't any good if you don't wait.
for i=1,300 -1 do wait(1) h.Text = i.."seconds left!" end
|
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 08:42 PM |
@king, I already fixed it. @king, your loop will not count down, as you are starting from 1 and incrementing down by -1, consequently, you will never make it to 300.
You could try this...
h.Text = tostring(""..i.." seconds left!")
Not sure if that will work, but it will certainly make sure it is a string. |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2011 08:44 AM |
Well, I've been trying to fix it all night, but it doesn't work.
Here's what I have:
local h = Instance.new "Hint" h.Name = CountDownMessage h.Parent = game.Workspace h.Text = ""
wait (0.1)
for i=300,1 -1 do wait(1) h.Text = tostring(""..i.." seconds left!") end
and it still says, "String Expected"
._. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 23 Nov 2011 10:01 AM |
Useless reply ._.
Don't post unless you're willing to herlp. This is scripting helpers, not 'People Saying 'Nope.' To Help Request Forum h4x' |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2011 11:22 AM |
Its been a day and a half and the script is still broken
I hope its not so hard no one can do it :P |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2011 11:37 AM |
| The string expected is for the Name property, put the name that you want it to be in quotes. |
|
|
| Report Abuse |
|
|
bourlo
|
  |
| Joined: 11 Aug 2009 |
| Total Posts: 399 |
|
|
| 23 Nov 2011 12:05 PM |
you said at the beginning: local h = Instance.new "Hint" h.Name = CountDownMessage h.Parent = game.Workspace
h.Name should be a string so "CountDownMessage" unless you've have made a references to it before |
|
|
| Report Abuse |
|
|
bourlo
|
  |
| Joined: 11 Aug 2009 |
| Total Posts: 399 |
|
|
| 23 Nov 2011 12:06 PM |
| oh yeah sorry i didnt see your post slayer :( |
|
|
| Report Abuse |
|
|