Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
22 May, 2013, 00:37:58 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1]   Go Down
  Print  
Author Topic: Strange/Rnd domain err. -  (Read 429 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Wretchedlout
LV3 Member (Next: 100)
***
Offline Offline

Last Login: Yesterday at 01:00:13
Date Registered: 04 April, 2012, 08:11:00
Posts: 64

Topic starter
Total Post Ratings: +6

View Profile
« on: 07 April, 2012, 19:47:43 »
0

So my friend wanted a game on his calc for Russian roulette so I made it easy. It asks for how many people, chambers, and names, then you can play.
But sometimes when I run it I get err: domain. When I goto, it takes me to an output which makes no sense.
I basically have

Lbl A
Input "",X
If x<1 or x>8: goto A

For Q,1,X
Output(Q,1,"*
End


What is more weird is that it works for 2-4 rounds but then suddenly comes up with domain err.
Logged
aeTIos
You got stair'd!
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:59:53
Date Registered: 15 September, 2010, 06:00:00
Location: Netherlands, Overijssel
Posts: 3118


Total Post Ratings: +120

View Profile
« Reply #1 on: 07 April, 2012, 19:56:33 »
0

yeah happens for me sometimes too in basic. Seems to have to do with input ""
Also you can use [code][/code] tags to put yuor code into code blocks.
like this:

1
2
3
4
code here
look it's monospaced!!
so you can create ascii art here!
Smiley
welcome here btw.
« Last Edit: 07 April, 2012, 19:57:59 by aeTIos » Logged

If something above sounds rude, feel free to vote it down, it was not meant to be rude<<lolol
--Always stay relAXEd!--


Spoiler for Hidden:


[







Spoiler for Still Alive:
This was a triumph.
I'm making a note here: HUGE SUCCESS.
It's hard to overstate my satisfaction.

Aperture Science:
We do what we must because we can.
For the good of all of us
Except the ones who are dead.

But there's no sense crying over every mistake
You just keep on trying till you run out of cake
And the science gets done and you make a neat gun
For the people who are still alive.

I'm not even angry.
I'm being so sincere right now.
Even though you broke my heart and killed me.
And tore me to pieces.
And threw every piece into a fire.
As they burned it hurt because
I was so happy for you.

Now these points of data make a beautiful line
And we're out of beta we're releasing on time.
So I'm GLaD I got burned think of all the things we learned
For the people who are still alive.

Go ahead and leave me.
I think I prefer to stay inside.
Maybe you'll find someone else to help you.
Maybe Black Mesa -
THAT WAS A JOKE. HA HA, FAT CHANCE.
Anyway, this cake is great:
It's so delicious and moist.

Look at me still talking when there's science to do.
When I look out there it makes me GLaD I'm not you.
I've experiments to run there is research to be done
On the people who are still alive

And believe me I am still alive.
I'm doing science and I'm still alive.
I feel FANTASTIC and I'm still alive.
While you're dying I'll be still alive.
And when you're dead I will be still alive.

Still alive
Still alive
Yeong
Eternally Young Scarlet Moon
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: 20 May, 2013, 01:44:48
Date Registered: 15 October, 2010, 04:29:49
Location: Arden, NC
Posts: 3694


Total Post Ratings: +260

View Profile
« Reply #2 on: 07 April, 2012, 20:06:55 »
0

hmm from the look of the code, the only way to get domain error is to type non-integer number.
Logged

Project Redemption....

My project progresses:HERE
My Pastebin stuffs:HERE
Check your rate: HERE
My Animations: HERE
Spoiler for Images :D:

ノ◕ヮ◕)ノ:・゚ PENGUIN WAVE!!:„ø¤º°¨ ¨°º¤KEEP THE PENGUIN GOING ¸„ø¤º°¨ ¨°º¤øº LETS GO PENGUIN !¤¤º°¨¨°º¤øº¤ø„¸¸ø¤º°¨„ ø¤º°¨¨°º
Wretchedlout
LV3 Member (Next: 100)
***
Offline Offline

Last Login: Yesterday at 01:00:13
Date Registered: 04 April, 2012, 08:11:00
Posts: 64

Topic starter
Total Post Ratings: +6

View Profile
« Reply #3 on: 07 April, 2012, 20:45:42 »
0

Well, I changed it to

1
Input "people",X
But it still dosen't work Sad
Logged
Yeong
Eternally Young Scarlet Moon
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: 20 May, 2013, 01:44:48
Date Registered: 15 October, 2010, 04:29:49
Location: Arden, NC
Posts: 3694


Total Post Ratings: +260

View Profile
« Reply #4 on: 07 April, 2012, 20:46:30 »
0

can you post the whole code?
Logged

Project Redemption....

My project progresses:HERE
My Pastebin stuffs:HERE
Check your rate: HERE
My Animations: HERE
Spoiler for Images :D:

ノ◕ヮ◕)ノ:・゚ PENGUIN WAVE!!:„ø¤º°¨ ¨°º¤KEEP THE PENGUIN GOING ¸„ø¤º°¨ ¨°º¤øº LETS GO PENGUIN !¤¤º°¨¨°º¤øº¤ø„¸¸ø¤º°¨„ ø¤º°¨¨°º
Wretchedlout
LV3 Member (Next: 100)
***
Offline Offline

Last Login: Yesterday at 01:00:13
Date Registered: 04 April, 2012, 08:11:00
Posts: 64

Topic starter
Total Post Ratings: +6

View Profile
« Reply #5 on: 07 April, 2012, 21:40:01 »
0


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
:" "→Str1
:Str1→Str2
:Str1→Str3
:Str1→Str4
:Str1→Str5
:Str1→Str6
:Str1→Str7
:Str1→Str8
:
:
:
:ClrHome
:Output(1,1,"RUSSIAN ROULETTE                PRESS ENTER TO        FIRE
:For(A,0,1750
:End
:Lbl AA
:ClrHome
:Output(2,1,"HOW MANY PEOPLE?(1≤X≤8)
:Input "=",X
:If X<1:Goto AA
:If X>8:Goto AA
:Lbl AB
:ClrHome
:Output(2,1,"HOW MANY        CHAMBERS?       (>0)
:Input "=",Y
:If Y<1:Goto AB
:
:ClrHome
:Output(1,1,"PLAYER NAMES
:For(θ,0,750
:End
:ClrHome
:Input "1=",Str1
:If X>1:Input "2=",Str2
:If X>2:Input "3=",Str3
:If X>3:Input "4=",Str4
:If X>4:Input "5=",Str5
:If X>5:Input "6=",Str6
:If X>6:Input "7=",Str7
:If X>7:Input "8=",Str8
:
:ClrHome
:Output(1,3,Str1
:Output(2,3,Str2
:Output(3,3,Str3
:Output(4,3,Str4
:Output(5,3,Str5
:Output(6,3,Str6
:Output(7,3,Str7
:Output(8,3,Str8
:DelVar ∟ALIVE
:8→dim(∟ALIVE
:For(θ,1,X
:¦ 1→∟ALIVE(θ)
:End
:
:
:While 1
:¦ For(θ,1,X
:¦ ¦ If ∟ALIVE(θ)=0:End
:¦ Output(θ,1,"*
:¦ Pause
:¦ randInt(1,Y)→Q

:¦ :If Q=1:Then
:¦ ¦ ClrDraw:RecallPic 2:For(W,0,1750):End:Output(θ,1," ":Output(θ,11,"(DEAD)":0→∟ALIVE(θ):
:¦ ¦
:¦ ¦ :If ∟ALIVE(1)+∟ALIVE(2)+∟ALIVE(3)+∟ALIVE(4)+∟ALIVE(5)+∟ALIVE(6)+∟ALIVE(7)+∟ALIVE(8)=1:Goto H:End


:¦ If Q≠1:Then:Output(θ,11,"(MIS)":For(W,0,1750):End:Output(θ,1," ":Output(θ,11,"     "
:¦ End
:End
:End
:
:Lbl H
:
:For(θ,1,8
:¦ If ∟ALIVE(θ)=1:Goto G
:End
:
:
:Lbl G
:ClrHome
:If θ=1:Output(1,1,Str1
:If θ=2:Output(1,1,Str2
:If θ=3:Output(1,1,Str3
:If θ=4:Output(1,1,Str4
:If θ=5:Output(1,1,Str5
:If θ=6:Output(1,1,Str6
:If θ=7:Output(1,1,Str7
:If θ=8:Output(1,1,Str2
:Output(2,1,"WINS
:Pause

(or attached file)
and btw: I know the code is all over the place :)

(the error is line 61)

* RR.8xp (0.98 KB - downloaded 8 times.)
« Last Edit: 07 April, 2012, 21:41:33 by Wretchedlout » Logged
Wretchedlout
LV3 Member (Next: 100)
***
Offline Offline

Last Login: Yesterday at 01:00:13
Date Registered: 04 April, 2012, 08:11:00
Posts: 64

Topic starter
Total Post Ratings: +6

View Profile
« Reply #6 on: 02 May, 2012, 04:10:35 »
0

still nobody? Undecided
Logged
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Yesterday at 21:06:29
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3753


Total Post Ratings: +605

View Profile
« Reply #7 on: 02 May, 2012, 04:23:22 »
0

I just saw this, I have an idea Smiley Is it right after your program RecallPics? If so, it is because that modifies the Y variable. Not sure if that is what is actually causing it or not, though Undecided
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


Wretchedlout
LV3 Member (Next: 100)
***
Offline Offline

Last Login: Yesterday at 01:00:13
Date Registered: 04 April, 2012, 08:11:00
Posts: 64

Topic starter
Total Post Ratings: +6

View Profile
« Reply #8 on: 02 May, 2012, 04:47:41 »
0

well, i don't know. I ran it a few times without fixing it and no errors occured, I changed Y to U so... i'm not sure
Logged
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:45:26
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #9 on: 02 May, 2012, 04:57:53 »
0

My general rule is to never use the Y variable, since you never can tell when it is going to get corrupted
Logged

Yeong
Eternally Young Scarlet Moon
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: 20 May, 2013, 01:44:48
Date Registered: 15 October, 2010, 04:29:49
Location: Arden, NC
Posts: 3694


Total Post Ratings: +260

View Profile
« Reply #10 on: 02 May, 2012, 05:08:22 »
0

as Builderboy said, never mess with X and Y variable when you're using a graph screen as they can be changed.
Logged

Project Redemption....

My project progresses:HERE
My Pastebin stuffs:HERE
Check your rate: HERE
My Animations: HERE
Spoiler for Images :D:

ノ◕ヮ◕)ノ:・゚ PENGUIN WAVE!!:„ø¤º°¨ ¨°º¤KEEP THE PENGUIN GOING ¸„ø¤º°¨ ¨°º¤øº LETS GO PENGUIN !¤¤º°¨¨°º¤øº¤ø„¸¸ø¤º°¨„ ø¤º°¨¨°º
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.297 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.