I need help again, same program, same problem. I now know what is happening, but I don't know why. Here is the code:

Code:
1->A
DelVar Z
34->X
For(G,1,7)
For(F,1,5)
sub(Str1,A,1)->Str2
Text(Z+4,X,Str2)
rand
Text(Z+4,X,"     
If Z=24
Text(Z+4,X,Str2)
Z+6->Z
End
A+1->A
X+4->X
DelVar Z
End

What keeps happening is that I get a Domain error because X continuously increases instead of going back up to the top. Someone please help.
I didn't get Domain error, but rather an Invalid Dim error. Why did you set it up like this, by the way? To make the string drop one character at a time, just use this:


Code:
44-2length(Str1
For(I,1,length(Str1
For(X,0,24
Text(X,Ans+4I,sub(Str1,I,1
End:End
What is the "44-2length(Str1" for? The string that I am using is only 7 characters long and doesn't change
MrDew25 wrote:
What is the "44-2length(Str1" for? The string that I am using is only 7 characters long and doesn't change


In that case you can center it yourself, but this automatically centers the text on screen.
So, I would do 44-2(7), or just 30?
Just 30 would be fine. Also, this means the in the first For loop, you can change length(Str1 to 7 as well.
Ok, but what were you saying again with the Invalid Dim error?
MrDew25 wrote:
Ok, but what were you saying again with the Invalid Dim error?


Not entirely sure, but for me your code broke because I used a string that was less than 7 character long when I tried it out, which is probably the reason why it broke. Smile But hey, one thing leads to another. Smile
Ok, I used your code:

Code:
44-2length(Str1)->Q
For(I,1,length(Str1))
For(X,0,24)
Text(X,Q+4I,sub(Str1,I,1))
End:End

and when I fire it up, I get a syntax error. Do you know why? When I push Goto, it sends me to the first For( command.
Sorry about the late reply, just had some dinner. No; your code looks to be correct. Try making sure there are no extra spaces after each line of code; sometimes this can happen if copied to SourceCoder or the like. Also, closing parentheses are generally not required. Wink
I have fixed it, you were right, there were spaces after them that caused an error. One thing that was wrong, but it was manageable.
(1) The first character stayed at the top. I fixed that my adding a space to the original string and pushed the string back by 4 pixels.
Cool! Glad it finally worked. Smile
Thanks, now, I have it so that it makes a random intro every time it loads. I have circles encircling my username, and what is randomized is the radius of the circle and how many circles. Now I want to randomize the outro. I have one that is just a line going across the screen, deleting everything. what other ideas do you have for an outro. I want at most three outros.
Perhaps scrolling text with little explosions or something... Smile
I feel like that is out of my programming knowledge. If you are willing to give some code to help out, I will try my hardest to create it.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement