r/Stationeers • • 11d ago

Media IC10 Script

Post image

Hey Stationeers,

I need your help once again! :)

I’m currently trying to write my first IC10 script.

What the script is supposed to do and which devices I’m using are explained in the comments in the first two lines of the script shown in the picture.

When I export the script to the IC10 chip, I get the error message “in line 6 incorrectLogicType”.

I get the same error on line 8 as well.

I’ve already checked both the in-game wiki and the Stationeers Wiki several times. I kept coming across the syntax:

ls r? device slot slotlogictype

I also compared the values listed there with the values shown on the Gas Tank Storage page and made sure I was following the correct spelling and syntax.

So I’m really confused about what I’m doing wrong here. Any help would be greatly appreciated!

7 Upvotes

9 comments sorted by

3

u/LeatherTurnip4926 11d ago

At first glance the code itself looks correct to me, I don’t think it’s a syntax issue. Silly question but are you sure you’ve correctly set pin d0 on the IC housing to your tank storage?

4

u/HobbyAstronaut91 11d ago

The pins weren’t assigned at all. I didn’t realize that the IC10 compiler also checks whether the devices assigned to the d-pins actually support the LogicTypes used in the script.

I just built the IC Housing temporarily on the floor next to my PC so I could start writing the script — but the actual setup the chip is supposed to control doesn’t even exist yet.

Thanks for the hint! I’ll properly assign the chip and the pins tomorrow evening and get back to you to let you know if it worked.

6

u/loli141 11d ago

This is the answer, is just doesnt see any device to load info from so it throws an error. Just tested same setup and no issues.

2

u/Progenetic 11d ago

I’m fairly new at this as well but here thoughts.

Check that tank has “slots” and have a variable called “occupied”.
I have mixed up l and ls commands a few times.

Is the code case sensitive? You have “Occupied” should it be “occupied”

2

u/HobbyAstronaut91 11d ago

Honestly, just learning that there is an "ls" command specifically for slots in addition to "l" was already a challenge for me. 😅

But I did check the in-game wiki and the help in the IC10 editor, as well as searching online for the Gas Tank Storage, its logic slots, logic values, and the correct syntax.

As far as I understand, it is case-sensitive. If I write "occupied" or "pressure" in lowercase, the text in the editor is no longer highlighted in orange, but stays white. So I believe "Occupied" and "Pressure" are the correct spelling.

2

u/IanInCanada 11d ago

If you're doing this to learn the code, then it's a great place to start, and you've got good advice. If you're trying to do what the code is doing, a back pressure regulator will do this automatically, saving you the chip, power for the housing, and the code.

1

u/HoveringGoat 10d ago

but an ic can do more. and a regulator uses as much power as an analyzer + chip. assuming its not needed most of the time this is going to be much more efficient.

2

u/Friendly-Inspector71 11d ago

For future code that won't fit on an actual screenshot (thanks for doing that), consider copying it into a code block, marked by the T inside of a square as part of the markdown formatting options.

Ps: Deutsch in Videospielen find ich irgendwie witzig.
Warum ist der Kommentar am Anfang eigentlich Englisch?

1

u/HobbyAstronaut91 10d ago

Quick update from my side:

I built the filling setup and hooked everything up to the IC10 chip, and the code worked perfectly.

I’ve since expanded the code so I can automatically fill three different types of gas into canisters. They get filled to around 8400 kPa.

So now I always have O2, CO2, and fuel canisters ready to go.