generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: String Help?

Previous Thread :: Next Thread 
Admiral1160 is not online. Admiral1160
Joined: 11 Jun 2010
Total Posts: 364
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
TundraFlames is not online. TundraFlames
Joined: 04 Jul 2011
Total Posts: 357
22 Nov 2011 06:03 PM

h.Text = i.."seconds left!"
Report Abuse
Admiral1160 is not online. Admiral1160
Joined: 11 Jun 2010
Total Posts: 364
22 Nov 2011 07:06 PM
Doesn't work, still says 'String Expected'
Report Abuse
slayer9365 is not online. slayer9365
Joined: 22 Oct 2007
Total Posts: 2312
22 Nov 2011 07:11 PM
for i = 300, 1, -1 do
wait(1)
h.Text=(i.." seconds left!")
end
Report Abuse
Admiral1160 is not online. Admiral1160
Joined: 11 Jun 2010
Total Posts: 364
22 Nov 2011 07:59 PM
thanks
Report Abuse
Admiral1160 is not online. Admiral1160
Joined: 11 Jun 2010
Total Posts: 364
22 Nov 2011 07:59 PM
still not working ._.
Report Abuse
slayer9365 is not online. slayer9365
Joined: 22 Oct 2007
Total Posts: 2312
22 Nov 2011 08:02 PM
What is the error?
Report Abuse
Admiral1160 is not online. Admiral1160
Joined: 11 Jun 2010
Total Posts: 364
22 Nov 2011 08:03 PM
Still says, 'String Expected.'
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
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
slayer9365 is not online. slayer9365
Joined: 22 Oct 2007
Total Posts: 2312
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
Admiral1160 is not online. Admiral1160
Joined: 11 Jun 2010
Total Posts: 364
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
Admiral1160 is not online. Admiral1160
Joined: 11 Jun 2010
Total Posts: 364
23 Nov 2011 09:57 AM
no one gunna help? ._.
Report Abuse
pokemon46804 is not online. pokemon46804
Joined: 02 Sep 2010
Total Posts: 373
23 Nov 2011 09:58 AM
Nope.
Report Abuse
Admiral1160 is not online. Admiral1160
Joined: 11 Jun 2010
Total Posts: 364
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
Admiral1160 is not online. Admiral1160
Joined: 11 Jun 2010
Total Posts: 364
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
slayer9365 is not online. slayer9365
Joined: 22 Oct 2007
Total Posts: 2312
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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image