Stationeers

Stationeers

Stationeers
Share the best world creations and game modifications with the community for Stationeers through Steam workshop.
Sensei Freak 14 Nov, 2020 @ 2:45pm
OutOfRegisterBounds
I do not know why it says this and why? It can read the 0.0000.... number and multiply with it but when dividing the number proves to be out of bounds?? and i canot seem to get around this issue with the little knowlage i have about scripting. it says 'Out of register bounds' at line 12??? according to math it should not be wrong. Urgh i do not know what the issue is any more and at this point i do not know what to do.
Please note that this might be a round about way of doing this but its how i go about learning how to script based on other scrips I've seen, and i work with a trail and error method.

alias WastePipeAnaliser d0
alias CO2Filter d1
alias H2OFilter d2
alias O2Filter d3
alias XFilter d4
alias NFilter d5
#move r5 0
#move r6 1

start:
l r0 d0 RatioCarbonDioxide
mul r5 r0 100
div r50 5 r5 <------------- This is line 12 ( I intentionally swapped the last 2 around)
div r40 r50 r0
#abs r50 r0
sne r55 r40 0
l r1 d0 RatioWater
mul r6 r1 100
div r51 r6 5
div r41 r51 r1
#abs r51 r1
sne r56 r41 0
l r2 d0 RatioOxygen
mul r7 r2 100
div r52 r7 5
div r42 r52 r2
#abs r52 r2
sne r57 r42 0
l r3 d0 RatioPollutant
mul r8 r3 100
div r53 r8 5
div r43 r53 r3
#abs r53 r3
sne r58 r43 0
l r4 d0 RatioNitrogen
mul r9 r4 100
div r54 r9 5
div r44 r54 r4
#abs r54 r4
sne r59 r44 0

l r10 d1 Power
l r11 d2 Power
l r12 d3 Power
l r13 d4 Power
l r14 d5 Power

or r61 r55 0
bgez r0 CO2
#beq r10 1 CO2a
f1:
or r62 r56 0
bgez r1 H2O
#beq r11 1 H2Oa
f2:
or r63 r57 0
bgez r2 O2
#beq r12 1 O2a
f3:
or r64 r58 0
bgez r3 X
#beq r13 1 Xa
f4:
or r65 r59 0
bgez r4 N
#beq r14 1 Na
f5:

j start

CO2:
s d1 On r61
j f1
CO2a:

j f1

H2O:
s d2 On r62
j f2
H2Oa:

j f2

O2:
s d3 On r63
j f3
O2a:

j f3

X:
s d4 On r64
j f4
Xa:

j f4

N:
s d5 On r65
j f5
Na:

j f5
Last edited by Sensei Freak; 14 Nov, 2020 @ 3:13pm
< >
Showing 1-4 of 4 comments
Sensei Freak 14 Nov, 2020 @ 3:22pm 
Ok I do not know what is going on any more

I added ' move r40 1' before the loop and it gives me now the same error on this line?????

For testing reasons i did the following...

alias WastePipeAnaliser d0
alias CO2Filter d1
alias H2OFilter d2
alias O2Filter d3
alias XFilter d4
alias NFilter d5
#move r5 0
move r40 1 <-------- i did this to test and i get the same 'OutOfRegisterBounds' error

start:
l r0 d0 RatioCarbonDioxide
#mul r5 r0 100 <-------
#div r50 r5 5 <-------
#div r40 r50 r0 <------- noted out
#abs r50 r0 <-------
sne r55 r40 0 <------- to test this argument
l r1 d0 RatioWater
mul r6 r1 100
div r51 r6 5
div r41 r51 r1
#abs r51 r1
sne r56 r41 0
l r2 d0 RatioOxygen
mul r7 r2 100
div r52 r7 5
div r42 r52 r2
#abs r52 r2
sne r57 r42 0
l r3 d0 RatioPollutant
mul r8 r3 100
div r53 r8 5
div r43 r53 r3
#abs r53 r3
sne r58 r43 0
l r4 d0 RatioNitrogen
mul r9 r4 100
div r54 r9 5
div r44 r54 r4
#abs r54 r4
sne r59 r44 0

.....
Last edited by Sensei Freak; 14 Nov, 2020 @ 3:27pm
Sensei Freak 14 Nov, 2020 @ 4:01pm 
Hmm well i found another script witch simplifies all i did here and works well
gpedro178 2 21 Nov, 2020 @ 6:52pm 
I think your problem is the number of the register, its limited, from r0 to r15 with r16 saved for "sp" and r17 saved for "ra".

If you limit the numbers of the register to that range, you should be fine.
Sensei Freak 22 Nov, 2020 @ 5:42am 
Thanks that helps a lot to understand this part
< >
Showing 1-4 of 4 comments
Per page: 1530 50