Computer Core

by Relik77

Computer is a modification for Factorio that’s all about computer programming. It allows you to write programs using the Lua programming language.

Utilities
6 years ago
0.15 - 0.16
25

b Certain APIs are not defined

6 years ago

Certain APIs such as lan, and wlan show up as being nil
Running the example from how to read wires returns
[string "function loop()..."]:2: attempt to index global 'lan' (a nil value)
This mod seems interesting, hopefully this can be fixed

6 years ago

Hi,

Can you give me more information about your code?
On my side the lan api works :
term.write(lan.getLeftSignals()) // Print the signal on term

NB:
The lan api work only on a "computer" placed on the ground (craft), not on your "personal computer" what you open from the icon at the top left.

To open a computer console on the floor, target it and use the keyboard shortcut (default: "CONTROL + Left mouse button". You can change it from the mod shortcut menu option)

You can know the list of available apis for a specific computer (personal, placeable, or "onboad"), from its console by entering: "help apis"

I think adding today or tomorrow, some examples on the use of apis lan and wlan
(They can be found here: https://github.com/Relik77/factorio_computer_core/tree/master/examples)
The examples are tested with the current version, so if I identify a problem I will fix it as soon as possible ;-)

New response