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: Weird bug. Flawed code is flawed.

Previous Thread :: Next Thread 
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
14 Jun 2014 08:23 PM
So I'm making a help guide for this game, right?
http://web.roblox.com/--place?id=123040379

I found that not many people understood what to do (I AM crazy, ya know?), so I thought I'd make a 3 page GUI to explain how the game works. My method for turning the pages is a simple < Page 2 > like setup and the text just changes every time a button is clicked.

Since I wanted it to be nice, I made it so that the < button only appeared after page 1, and the > disappeared on page 3.

Here's the weird part: It works perfectly when I flip the pages forward up to page 3, and fine back to page 2, but when I go back to page 1, three things happen:

1) the page number doesn't update, and it says page 2 on page 1 (Note: the content of the page updates)
2) The < button doesn't disappear on page 1
3) if I click the < button again once I've hit page 1, I get the error "String Expected"

As for the code: Since I've pretty much scared half of you away with a tl;dr'er, I will put the code up on pastebin for convenience.

pastebin.com/HvhwxdFW
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
14 Jun 2014 08:27 PM
title1 = script.Parent.Name
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
14 Jun 2014 08:27 PM
.Text* my bad.

But I haven't checked the script further than that so there may be more errors
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
14 Jun 2014 08:33 PM
Oh, ofc. Thanks!
Unfortunately can't be the thing that's causing this huge mess, or else both buttons would be flaky.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
14 Jun 2014 08:35 PM
The second button wouldn't since you can only go forward, not back to page 1.
That should fix your error
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
14 Jun 2014 08:37 PM
You scared me for a second!
No, the problem persists.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
14 Jun 2014 08:38 PM
You still get the string expected error O_o?
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
15 Jun 2014 11:20 PM
yah.
I warned you it was weird.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
16 Jun 2014 10:07 AM
so hard :c
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
16 Jun 2014 03:42 PM
still hard. What kind of person hating robot is trying to take over my help guide.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
16 Jun 2014 03:51 PM
title1 = script.Parent.Parent.Title.Text
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
16 Jun 2014 04:19 PM
cntkillme already pointed that out, sorry. Still not the cause of the problem. :/
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Jun 2014 04:53 PM
Is curpage a textlabel?
You should tonumber it when you compare it just to be safe.

But other than that, I don't see any problem
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
16 Jun 2014 11:47 PM
It's an IntValue. I made it externally kept since it seemed inconsistent despite the arithmetic to be the same in both scripts.

title = script.Parent.Text would keep a record of the current text, right?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 Jun 2014 12:19 AM
Yeah, whatever you put it as the time.
Try making sure it isn't nil at the time or put the actual text.

page1 = script.Parent.Parent.Body.Text or script.Parent.Parent:WaitForChild"Body.Text
title1 = script.Parent.Text
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 Jun 2014 12:21 AM
at the time*
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
17 Jun 2014 11:46 AM
Yeah I thought of that too. Didn't get to test it until today, and that fixed it. Guess they must have gotten redefined.
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