Woops, sorry. I had used my most recent code (where I added "0" and "9" to it), and when I edited out the zeros after noticing that, I forgot that one That should be a 1
- Sonlen
- Calculator Deity (Posts: 1679)
- 19 Sep 2010 09:50:54 pm
- Last edited by Sonlen on 19 Sep 2010 10:14:47 pm; edited 2 times in total
Code:
:If C=1 and D=1
:[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0→[A]
:If C=1 and D=2
:[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0→[A]
:If C=1 and D=3
:[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0→[A]
:If C=1 and D=4
:[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0→[A]
:If C=4 and D=4
:[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0→[A]
This is the code for ZMAP1, and the rest are all blocks of 4x4 pieces of the entire overworld, and ZMAP calls the different ZMAPn based on coordinates, and then the particular ZMAPn stores the correct map to [A], then returns to the main game engine and it draws it out.
PS: There are only 0's right now as placeholders until I get to those parts.
comicIDIOT wrote:
KermMartian wrote:
Stop double-posting. If you can't edit your posts, delete your old post before you post a new post.
I am too lazy to actually make my own post so instead I quote people and then don't say anything newdragon1414@att.net / Google and Yahoo E-Mail
Why are you mentioning that? The code Weregoose gave you doesn't care about that; it just cares that C and D are within the bounds in the long program you had before he replaced it with a single line.
Yeah, that's what I just realised. >.<
comicIDIOT wrote:
KermMartian wrote:
Stop double-posting. If you can't edit your posts, delete your old post before you post a new post.
I am too lazy to actually make my own post so instead I quote people and then don't say anything newdragon1414@att.net / Google and Yahoo E-Mail
Sonlen wrote:
Yeah, that's what I just realised. >.<
Wait, what exactly were you trying to do with the code I and Weregoose gave you, then? - Sonlen
- Calculator Deity (Posts: 1679)
- 19 Sep 2010 09:58:15 pm
- Last edited by Sonlen on 19 Sep 2010 09:59:23 pm; edited 1 time in total
Give me a sec and I will post what I was doing.
Code:
Code:
:If C≥1 and D≥1 and C≤4 and D≤4
:"ZMAP1"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:If C≥1 and D≥5 and C≤4 and D≤8
:"ZMAP2"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:If C≥1 and D≥9 and C≤4 and D≤12
:"ZMAP3"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:If C≥1 and D≥13 and C≤4 and D≤16
:"ZMAP4"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:If C≥5 and D≥1 and C≤8 and D≤4
:"ZMAP5"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:If C≥5 and D≥5 and C≤8 and D≤8
:"ZMAP6"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:If C≥5 and D≥9 and C≤8 and D≤12
:"ZMAP7"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:If C≥5 and D≥13 and C≤8 and D≤16
:"ZMAP8"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:real(10,0,1
:prgmXTEMP001
:real(10,1,1
comicIDIOT wrote:
KermMartian wrote:
Stop double-posting. If you can't edit your posts, delete your old post before you post a new post.
I am too lazy to actually make my own post so instead I quote people and then don't say anything newdragon1414@att.net / Google and Yahoo E-Mail
Sonlen wrote:
Give me a sec and I will post what I was doing.
Aight, thanks for that. But you now understand what the purpose of it is, I hope? Sonlen wrote:
Give me a sec and I will post what I was doing.
Code:
Code:
:If C≥1 and D≥1 and C≤4 and D≤4
:"ZMAP1"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:If C≥1 and D≥5 and C≤4 and D≤8
:"ZMAP2"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:If C≥1 and D≥9 and C≤4 and D≤12
:"ZMAP3"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:If C≥1 and D≥13 and C≤4 and D≤16
:"ZMAP4"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:If C≥5 and D≥1 and C≤8 and D≤4
:"ZMAP5"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:If C≥5 and D≥5 and C≤8 and D≤8
:"ZMAP6"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:If C≥5 and D≥9 and C≤8 and D≤12
:"ZMAP7"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:If C≥5 and D≥13 and C≤8 and D≤16
:"ZMAP8"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:real(10,0,1
:prgmXTEMP001
:real(10,1,1
I can see how that'd be kinda crazy
KermMartian wrote:
Sonlen wrote:
Give me a sec and I will post what I was doing.
Aight, thanks for that. But you now understand what the purpose of it is, I hope?Yes, the sub part adds on to the ZMAP so that is calls the specific one, the "12345678" parts tells it which one exactly.
comicIDIOT wrote:
KermMartian wrote:
Stop double-posting. If you can't edit your posts, delete your old post before you post a new post.
I am too lazy to actually make my own post so instead I quote people and then don't say anything newdragon1414@att.net / Google and Yahoo E-Mail
Sonlen wrote:
KermMartian wrote:
Sonlen wrote:
Give me a sec and I will post what I was doing.
Aight, thanks for that. But you now understand what the purpose of it is, I hope?Yes, the sub part adds on to the ZMAP so that is calls the specific one, the "12345678" parts tells it which one exactly.
KermMartian wrote:
Sonlen wrote:
KermMartian wrote:
Sonlen wrote:
Give me a sec and I will post what I was doing.
Aight, thanks for that. But you now understand what the purpose of it is, I hope?Yes, the sub part adds on to the ZMAP so that is calls the specific one, the "12345678" parts tells it which one exactly.
Well you just confused me for 1, but it does work.
comicIDIOT wrote:
KermMartian wrote:
Stop double-posting. If you can't edit your posts, delete your old post before you post a new post.
I am too lazy to actually make my own post so instead I quote people and then don't say anything newdragon1414@att.net / Google and Yahoo E-Mail
I know I confused you, but don't let yourself stay confused. Do what I suggest, create C and D in your mind, then run through the program, including conditionals and sub()s and stuff, line by line, and you'll see why the If statements are superfluous.
I am going to assume you mean how it has to check C and D 2 times per If, and in all 16 times, not to mention the math it has to do over and over, is that what you are getting at.
comicIDIOT wrote:
KermMartian wrote:
Stop double-posting. If you can't edit your posts, delete your old post before you post a new post.
I am too lazy to actually make my own post so instead I quote people and then don't say anything newdragon1414@att.net / Google and Yahoo E-Mail
Sonlen wrote:
I am going to assume you mean how it has to check C and D 2 times per If, and in all 16 times, not to mention the math it has to do over and over, is that what you are getting at.
But that's the thing, it doesn't, it only does it once! Because you're already doing If [statement on C and D], you already know which of {12345678} you're using before the sub() starts. You could just switch back to "ZMAPN under each of those If statements.
Blinders. Off. Now.
Code:
=/equals/is the same as/has zero deviation from
Code:
The latter doesn't just replace one section of the former; it replaces ALL of it. I've done the math, rigorously tested it, and explained the logic to you. It would be a far better learning experience if were to try to break down your code exactly as I have done before, rather than senselessly expanding my code toward yours. I assure you that, down to the last minutiae of every conceivable factor, the routines have 100% corresponding input-to-output behaviors; they are completely and utterly and irrefutably identical. (Assuming that C<1 or D<1 or C>8 or D>16 is always untrue in the context of this routine.)
Overall, your assumption that the code is broken is driving me bonkers.
Code:
:If C≥1 and D≥1 and C≤4 and D≤4
:"ZMAP1
:real(10,0,1
:prgmXTEMP001
:real(10,1,1
:If C≥1 and D≥5 and C≤4 and D≤8
:"ZMAP2
:real(10,0,1
:prgmXTEMP001
:real(10,1,1
:If C≥1 and D≥9 and C≤4 and D≤12
:"ZMAP3
:real(10,0,1
:prgmXTEMP001
:real(10,1,1
:If C≥1 and D≥13 and C≤4 and D≤16
:"ZMAP4
:real(10,0,1
:prgmXTEMP001
:real(10,1,1
:If C≥5 and D≥1 and C≤8 and D≤4
:"ZMAP5
:real(10,0,1
:prgmXTEMP001
:real(10,1,1
:If C≥5 and D≥5 and C≤8 and D≤8
:"ZMAP6
:real(10,0,1
:prgmXTEMP001
:real(10,1,1
:If C≥5 and D≥9 and C≤8 and D≤12
:"ZMAP7
:real(10,0,1
:prgmXTEMP001
:real(10,1,1
:If C≥5 and D≥13 and C≤8 and D≤16
:"ZMAP8
:real(10,0,1
:prgmXTEMP001
:real(10,1,1
:Return
=/equals/is the same as/has zero deviation from
Code:
:"ZMAP"+sub("12345678",1+4int(C/4-4‾¹)+int(D/4-4‾¹),1
:real(10,0,1
:prgmXTEMP001
:real(10,1,1
The latter doesn't just replace one section of the former; it replaces ALL of it. I've done the math, rigorously tested it, and explained the logic to you. It would be a far better learning experience if were to try to break down your code exactly as I have done before, rather than senselessly expanding my code toward yours. I assure you that, down to the last minutiae of every conceivable factor, the routines have 100% corresponding input-to-output behaviors; they are completely and utterly and irrefutably identical. (Assuming that C<1 or D<1 or C>8 or D>16 is always untrue in the context of this routine.)
Overall, your assumption that the code is broken is driving me bonkers.
Weregoose wrote:
The latter doesn't just replace one section of the former; it replaces ALL of it. I've done the math, rigorously tested it, and explained the logic to you. It would be a far better learning experience if were to try to break down your code exactly as I have done before, rather than senselessly expanding my code toward yours. I assure you that, down to the last minutiae of every conceivable factor, the routines have 100% corresponding input-to-output behaviors; they are completely and utterly and irrefutably identical. (Assuming that C<1 or D<1 or C>8 or D>16 is always untrue in the context of this routine.
how would you make a single variable equal more then one number.
for example:
randint(1,5)->A
if A<3
then
disp "yo"
pause
end
if A>4
then
disp "yo mo"
pause
end
if A=3,4
then
disp "hello"
pause
end
the problem I am encountering is that the last part dose not work
how could i do it with out doing this.
if A=3
then
disp "hello'
pause
end
if A=4
then
disp
pause
end
for example:
randint(1,5)->A
if A<3
then
disp "yo"
pause
end
if A>4
then
disp "yo mo"
pause
end
if A=3,4
then
disp "hello"
pause
end
the problem I am encountering is that the last part dose not work
how could i do it with out doing this.
if A=3
then
disp "hello'
pause
end
if A=4
then
disp
pause
end
You're probably looking for " or "
Instead of something like "A=3,4" (which, as you know, fails), you can use "A=3 or A=4" (" or " is in the test menu, logic column. [Test is 2nd+Math]. Just in case you didn't know )
Instead of something like "A=3,4" (which, as you know, fails), you can use "A=3 or A=4" (" or " is in the test menu, logic column. [Test is 2nd+Math]. Just in case you didn't know )
KermMartian wrote:
Weregoose wrote:
The latter doesn't just replace one section of the former; it replaces ALL of it. I've done the math, rigorously tested it, and explained the logic to you. It would be a far better learning experience if were to try to break down your code exactly as I have done before, rather than senselessly expanding my code toward yours. I assure you that, down to the last minutiae of every conceivable factor, the routines have 100% corresponding input-to-output behaviors; they are completely and utterly and irrefutably identical. (Assuming that C<1 or D<1 or C>8 or D>16 is always untrue in the context of this routine.
So I am assuming you have been trying to say something to me, and I have not yet believed you? If you have been saying that, it's not that I don't believe you, it is that I have not noticed that, or it didn't quite hit me.
comicIDIOT wrote:
KermMartian wrote:
Stop double-posting. If you can't edit your posts, delete your old post before you post a new post.
I am too lazy to actually make my own post so instead I quote people and then don't say anything newdragon1414@att.net / Google and Yahoo E-Mail
That reply was rooted in A) my understanding from IRC logs that you were having trouble running the code, which indicated to me that you weren't using it in the way it was provided, and B) my seeing where you had duplicated the code eight times over, which confirmed that understanding. I even explained exactly what the code does and how it was derived before your problems showed up. Anyway, sorry if I overreacted.
@Zerocode: You can write text (in quotes) on the same line as a Pause. Try it and see what it does.
@Zerocode: You can write text (in quotes) on the same line as a Pause. Try it and see what it does.
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
» Go to Registration page
» Goto page Previous 1, 2, 3, 4, 5, 6 Next
» View previous topic :: View next topic
» View previous topic :: View next topic
Page 4 of 6
» 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
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