Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Search the Community

Showing results for tags 'Lua'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • OpenComputers
    • Announcements
    • Feedback
    • IRC
  • Code Central
    • Support
    • Showcase
    • Tutorials
  • Addons & More
    • Addons Mods
    • Architectures
    • OpenEngineering Task Force
  • General
    • Lounge
    • Forum Games
    • Showcase
    • Servers
  • Archives
    • Public Archives

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Minecraft


GitHub


IRC


Fediverse ID


Location


Interests

  1. VEB For Banks is a yet to be released Banking Program for OpenComputers, it runs on low tier computers but works best with a tier 2 screen. The Program allows you to manage bank accounts and transactions as well as record player banking activity over time. It has an install wizard and is quite automated so u wont need to know much about programming for it to work. Computer Requirements: Basic Components OpenOS (Lua 5x) Recommended: Tier 2 Components Tier 2 Screen and Graphics Card OpenOS (Lua 5x) Feel free to add comments, I would love recommendations
  2. I decided to port ST-NICCC (Which is an ATARI ST Demo) To OpenComputers Via Lua 5.3 because there are almost no demoscenes on OpenComputers \^_^/ If you wanna try this demo just do: pastebin run h9zUNB1x or pastebin get h9zUNB1x OCNICCC.lua Here are some screenshots! Source Code Is At https://pastebin.com/h9zUNB1x Video Showing The Demo Running! https://www.youtube.com/watch?v=XjIgFmEaIpo
  3. Hello. I’m entirely new to Opencomputers and Lua scripts. I’m not familiar with the language nor can I code. I would like ask how to create a automatic door to open with a passcode. I have all the components just don’t know how to make it all work! Thanks in advance ;)
  4. So I made myself a little lua script to read the inventory of my me storage system and also list the amount of bytes they require. Its my first script so I'm sure there are better ways to do all of this. The Me Network is connected to the Computer via an adapter on the me controller of the network. Pastebin here Now what it does is it uses the getItemsInNetwork function to list all items in a loop and display the name and amount of Bytes of each item in one line. A line counter goes up for each of the items added which is needed later. After all Items are l
  5. Hello guys i am Symbo i know this is a simple tutorial but the fact that idk programming well let's talk about it! Now the programming language as named LUA is a programming language that is very easy to learn! Let's get start with an explication of what you sould start with. Now whos like me that dosen't know programming well your here to learn some. You sould go ahead and get ComputerCraft and learn CC's lua because it's the same but some apis are modified because OC uses direct lua. This is the most inpersive concept of learning lua without learning the apis. First of all i am not
  6. Description: I need a controling system for distance control of my bunker. Mods: OpenComputer for 1.12.2 Opensecurity for 1.12.2 OpenGlasses for 1.12.2 Functions: Door state control Lock/Unlock doors Key card locks for piston doors All of it must controled from glasses from openglasses If you don't understood somethink, please write and i will answer you as soon as posible. And sorry for mistakes, i'm from Russia ans not master of english.
  7. I have tried for a long time to figure out a way to read a NBT Tag from Lua but all it says when I hit enter is 'nil "0"'. For example: In reactorcraft, you can make toroid magnets, and for some reason unlike other blocks in reactorcraft, you cannot read the tank levels. So, you must get the NBT data. I looked in the mod files and found the tags, but when I put the string into the function to get the NBT Tag, it says 'nil "unknown error"', meaning it knows that it is a recognized tag, becuase otherwise with a random string nothing happens. Please help me get this data f
  8. It seems completely funny but I am actually trying to get through this for the last 2 days: I try to access weather data through the OpenWeatherMap.org API wich seems to work fine with internet.request(url). The problem is just that it returns me the JSON as a table instead of a String. I tried to access fields of that table but everything seems to return nil. I just can't get to access anything from that table. There are tons of JSON serialization librarys out there but they all need the JSON as a String. I am completely lost rn. This is the API response that gets stored as a t
  9. hi i am okay to computercraft but a complete newb to openccomputers but here is my question I have made a program in cc and then ported it over to oc it works but for some unknown reason will it not read the data from my table or maybe from ae2 itself here is the code so what's wrong local component = require "component" local gpu = component.gpu local colors = require("colors") local term = require "term" local me = component.me_interface local monX,monY = gpu.getResolution() local low = 64 local meItems = { [1] = {"Iron Ingot","minecraft:iron_ingot","0"}, [2] = {
  10. I'm writing a kernel that has cooperative multi-tasking. It works great, but one job of it is to track a process' memory usage. It can track more memory being used but If the coroutine sets a bunch of stuff to nil, it should be able to subtract the difference as well. However sometimes the garbage collector might not get around to freeing it by the time the test is performed leading to an inaccurate result. Is there some way of forcing a garbage collector cycle?
  11. I am attempting to write an OS from scratch and I have come up with a couple questions that somebody can hopefully clarify for me as I cannot continue without the following knowledge. 1).Since a critical function like require is unavailable, can someone point me to general steps needed to write a custom require function. 2).What would be needed to implement a custom filesystem without any libraries from openos. Any help is greatly appreciated
  12. I did a program to manage my batteries and reactors, and i got a problem in reactor.setActive(true/false) for address, name in pairs(reactorsID) do local reactor = component.proxy(address) countR = countR + 1 local tR = (countR + count) * 3 progressBar( name, tR, reactor.getEnergyStored(), reactor.getEnergyCapacity(), 0x00bb00, true, "RF") progressBar( "Reactor(Energy Last Tick)", tR + 3, math.ceil(reactor.getEnergyProducedLastTick()), 6200, 0x00bb00, true, "RF") if brPower + totalPower < brMaxPower + totalMaxPower then reactor.setActive(True) else
  13. Got this error, but i have no idea how to fix it, need some help!. Here is the code. local component = require("component") local term = require("term") local gpu = component.gpu local cube = component.basic_energy_cube local event = require("event") local colors = { black = 0x000000, red = 0xC14141} gpu.setBackground(colors.black) term.clear() local infos = {} cube["stats"] = {} function setInfos() infos["stored"] = { x = 3, y = 2, weight = 73, height = 1, title = "STORED ENERGY : ", unit = " RF"} infos["capacity"] = { x = 3, y = 4, weight = 73, height = 1, title =
  14. I did this program, it's very simple, but i want to terminate it and i don't know how to do it... I tried Ctrl + C, Ctrl + Alt + C. I need some help. local component = require("component") local term = require("term") local event = require("event") local keyboard = require("keyboard") local cube = component.basic_energy_cube local computer = component.computer local gpu = component.gpu local w, h =gpu.getResolution() local colors = {} colors.gray = 0x555555 colors.red = 0xFF0000 colors.lime = 0x00FF00 function label(x, y, message, color, ...) local color = color or gpu.getFore
  15. So I am coming from ComputerCraft and the term API there is pretty straight forward and allows us to create windows to write / redirect to. Anyway, in the term API wikipage of OpenComputers there is for example the method term.bind with an optional parameter "window", the problem is I can't find any information about this parameter and I assumed that this would be the same kind of "window" as in CC and I won't have to write my own API for it. Do you guys know something about it?
  16. I know that "not nil" is wrong but how to test if the input is a nummber and do something when input is a nummber. read = io.read() if string.match(read, "(%d+)") == not nil then -- do something end
  17. I know that "not nil" is wrong but how to test if the input is a nummber and do something when input is a nummber. read = io.read() if string.match(read, "(%d+)") == not nil then -- do something end
  18. Michael

    Energy Stored

    Hello everyone, I'm trying to set up a Opencomputers energy monitoring system that will control the energy level of an Industrialcraft2 mfsu by turning on 1 to 6 reactors but I'm having problems at the energy reading part. Here is my code so far: https://pastebin.com/654kRYaf (ignore that getEnergyStored is commented out, I was testing something and uploaded to pastebin wrong version), but here is an abbreviated version with comments: -------------start of script---------- local fill = 0 --predefine variable fill local cap = 0 --predefine variable capacity require
  19. I sent the command '=component.printer3d.addShape(6,6,0,9,7,0,"hardened_clay_stained_lime")', and ended up with this error 'empty block' That's it. What am I doing wrong?
  20. Good morning. I have a problem with an operation to do in the LUA language: I have a file in which I have stored data, separated by line. I would need to read this file and store every line of this in an array, ignoring the first one. For example: array = {line2, line3, etc} Next, I would also need to compare each of these lines with a string, to check if it is contained, and I would need to know how to do both. Thanks in advance for the help.
  21. Hi! I have some problems with getting this library to work that should add buttons to the hud of the mod OpenGlasses: I made it first as a program and then converted it to a library for better organization of the code (and for later use). It worked fine when it was a program that called it's own functions, but now it throws errors when it calls them from another program. It says it can't insert the value to the empty table "API.buttonsName". When it was a standalone table it worked fine to insert the value into it, but it keeps saying the that spot is "bad" (that it doesn't exist?).
  22. Hi! I'm trying to do buttons in a OpenComputers addon OpenGlasses. But it seem to have problems with calling the element from the table. I am not very used to Lua and this is my first big project I'm working on in Lua. local component = require("component") local glasses = component.glasses local buttons = {} local function newButton(name,x,y,w,h,cR,cG,cB) buttons[name] = { rect = glasses.addRect(), pos = {x,y}, size = {w,h}, colo = {cR,cB,cG} } buttons[name][rect].setPosition(buttons[name][pos][1],buttons[name][pos][2]) --Here it says the value is null. butto
  23. Hello, for a few last days now, I've been having hard times with lua. I'm using OpenSecurity addon, but this problem I'm having more with lua. When I use Entity Detector it returns me table with info about entities around it. I can print those with function for k, v in pairs(output[1]) do print(k, v) end but I don't know how to make from this table unique variable strings, so I could have checked if the entity is me or not. I know that it will probably be some easy function, but I can't find it anywhere on the internet. I'm almost beginner in Lua, so please don't kill me Thanks
  24. Ah, yes. I am a noob when it comes to Lua, so if there is a very simple and obvious solution to this problem let me apologize in advance. Alright, here is the problem: I have this mod Thut's Elevators installed so you can make realistically working elevators in Minecraft. I have this program to control the elevator through buttons on a tier 2 screen. But due to how the mod is made you can't have a screen on board in the elevator, so I need to have a screen on each new elevator destination. The buttons are working and can send the elevator from one screen, but I can't switch it to another
  25. hallo i am working on a lib that can load a image, take screen shoots, and record the screen and play it after! at more then 20 fps but there is a issue the serialization's function serialize is trying to trun a super huge table in to a text(file) and becuse of that, the computer is giveing me a too long without yielding error NOTE: i do know what that means what ind the name of gud can i do about that please some one i tryed this with 1 fps and the table was never being to big and now with 10 fps. oh guys this is working it's just how lu
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.