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

Hellreaper

Members
  • Content Count

    26
  • Joined

  • Last visited

Posts posted by Hellreaper

  1. Hello, 

    I have an inventory (RandomThings:PlayerInterface) connected via an adapter to my PC. It acts like a chest so no problems there.
    I found the connection but I can't get the NBT data for the tool (I wanna see which part its made of).

    I ve checked using the debug data in MC and i read the data I am looking for inside the NBT data of the tool, but I have no idea how and if the computer can access this data.

    If anyone knows anything I can do to access this data please do tell as I am at a loss.

    2018-07-24_13_12_51.thumb.png.a2b0058db47ea4a7c67679e50269f89a.png2018-07-24_16_07_20.thumb.png.1c9fd7063c7a2a78d7bbc25d9e6b893a.png

  2. 21 minutes ago, Molinko said:

    Also I wanted to ask..? What does you program do?? lol. Can I see all ye code?

    http://pastebin.com/CZDtE8rn here ya go

    Im basically trying to make a terminal glasses terminal with a hud for every player. But I have my girlfriend playing on the server and I wanna change some stuff on her hud. (I may or not have drawn a heart around her cursor xD)
    Call it cheesy but its fun to do and good for a few laughs. That and poking around to see how crazy I can go with the terminal glasses interface. Been wanting to try it out and now I finally have some time to mess with it and actually get results

    EDIT: I fixed the nil thing, 

    users[ v.name ] = user

    this was causing it to not save the variable, i removed it and it works

  3. Damn tables are confusing... To understand more or less what you are doing here I would compare the users-array to a struct holding 3 variables.

    Feel free to give some lua coding standards cuz I know myself to be a messy cder when it comes to it ^^ I try to write in functions but I'm used to having everything in a separate file abnd having access to that.
    Since I dont really know how to do that in Lua it leaves me with long files with a lot of functions...  I googled a bit and found I could use shell but im not sure if that is an option that is worth using.

    Now I am trying to fix the first bit again because I may have made a mistake since the output of users by printing is returning an array but it is completely empty...
    Maybe it is a typo but I cannot seem to see what is going wrong right now, still looking though. 

    Also dont worry about the bridge.sync, its at the very bottom of my start function which in turn is calling the methods I need to run the program.

    the print here is the one going nil twice

    87752c8c1c.png

  4. 5 hours ago, Hellreaper said:

    Ah i c. What u r doing makes sense. Using the string in the if structure and  than sending the information to the value from the key.  What i was doing checks  using the name and only reads who is using the machine. I think thats how i messed up. 

    I want the code to work but before I use it I always like to ask how exactly it works if im not sure ^^ that way i cn keep learning. Thx man, i ll try it when i get home and post the results

    I more or less got it working, all I don't uite seem to get is how to call a method to draw on a surface with this, how do I add a method to users.surface? I was going to try and make a method for every if statement like I am doing, so I can organise eaily.
    Basically I make a method for everything I want on the hud seperately, and call those in a method for the player that I want it to see it. I am not sure what I need to write in the first method for it to show up in the specific hud.

    As a sidenote, do I need to worry about the order of methods? does a method need to be written above its call or does it not matter for lua? I know it doesnt in C# but in C++ it does so I m not sure,

    EDIT: Just found out the # doesnt seem to be working...

    12ff65ef9c.png

  5. Ah i c. What u r doing makes sense. Using the string in the if structure and  than sending the information to the value from the key.  What i was doing checks  using the name and only reads who is using the machine. I think thats how i messed up. 

    I want the code to work but before I use it I always like to ask how exactly it works if im not sure ^^ that way i cn keep learning. Thx man, i ll try it when i get home and post the results

  6. Hello again guys, I need some help getting the terminal glasses to do what I want. (if its possible because I don't see a way to do it)

    I am trying to get a HUD using the terminal glasses from openperipherals and I'm all set up with it, the only issue is that I do not know how
    to send an element of the HUD to one specific person.

    f.e.: I would write the information coming from my reactor to one person, and not send that info (or not show it) to the other.

    Using the getUsers() method I managed to get the name of the player (with thanks to the forums) but it seems it is read only?

    Concrete question: How do I write a piece of information to a terminal glasses from a single bridge, different for 2 or more players.

    http://pastebin.com/iCNfuk3Z
     

  7. Got another issue but a bit more complicated and I can't think how it would be possible, I have the names now and I can display them, but the current problem is that its a read only thing... And I cannot personalise the HUD per person,

    All I can do is get the names of the people connected to it. I cant get access and show a specific thing individually. Is this a limitation or am I missing something?

    (Should this be a new topic or can I put this here? Otherwise I ll move it)

  8. damn tahts one masterful piece.

    I used the second one, but i assume the #users is the amount of things in the table?

    I am unfamiliar with lua but that would make sense (I am used to some C++ but i m still in school for it)

    I also marked yours as best answer because if people run into the same problem your answer is most compolete and explanatory

    thank you very much. Now I can send secret messages and give my friends on my server their own glasses UI of their own choosing ^^

  9. That is actually accurate, i messed up. I now have the 2 names and uuids. Now I need a way to save only the names themselves preferably in an arrray.

    I tried it out in the lua interpreter and it gave me this, which is a 2D array with 2 elements I guess? Can I now somehow extract the ones that say name=string from this and store them?

    11b89adf57.png 

  10. As the title states, I am trying to put a component in a variable for faster runtime as I assume that a single call is cheaper than calling it every time.

    Unless this is irrelevant in opencomputers (of which i have no idea)

    Most of this code has been copied over from computercraft but it should work. I just dont know how to save a component to variabele since what I am doing doesnt seem to work.

     

    EDIT: also calling a function this way (bridge.sync) when i replaced bridge with component.openperipheral_bridge that did not work either -> attempt to index global 'component' (a nil value)

    i replaced sleep with os.sleep since that seems to be the correct way to type it. I tried to replace bridge.sync with component.invoke(component.openperipheral_bridge.address, sync) but that also did not work...

    I tried using the exact same code I typed in the first function in the lua interpreter and that worked, sadly in the script i wrote it doesnt...

    The left was before the edit, the right is current version. (and the error message is upon running the most recent version)
    I'm sorry for the messy question, I hope you can help...

     

    7c82c7b9f1.pngb6b9d43d60.png549776d317.png

  11. Hello,

     

    I have made a few creations in a creative world on a flatgrass and I have these saved as .schematic files.

    Now i am trying to find a way to convert a schematic file to a 3d-printer formatted file so i can downsize the creation and showcase it in my base, unfortunately I cannot make this myself so I would need someone else's help to make this xs.

     

    If at all possible it would be greatly appreciated.

  12. Hi, 

     

    while Its pretty simple most likely, 

    I seem to be unable to convert a table address to a string

    so I can know what item it is because that number doesnt mean anything to me...

     

    The function is returning an "object" but I cant find how  to convert it over to a string like yourmod:itemID...

  13. Hi people.

     

    I have a request/question for a little setup.

    I would like to use the chat box from computronics to read into the chat and when the correct sentence has been said,

    replace the items in my inventory with others from my storage system (AE2 -> ME system).

     

    The problem is, I have no idea how to go about doing this... And I would like some help on this.

    Since I have no idea how to go about this.

     

    I am running on the ATLauncher with the resonant rise 3.3 pack (with some custom mods but they arent important for this)

     

    Example:

     

    If I say in chat "Botania", it puts away the items in my inventory(preferably configurable which items get put away and which not)

    that are not related to botania. And inserts the items form the requested modpack into my inventory. I would do this because I kinda have a full inventory at all times and this would make going about all things a bit easier....

     

    Thank you in advance.

     

    P.S.: Im trying to make it myself but im not that experienced...

     

     

  14. I am aware of this, I know the syntax is correct for that specific block since i used this way in computercraft and the methods are the same.

     

    I have right clicked with the glasses that I needed for it on the bridge, and there is an adapter between my OC setup and the bridge. The glasses also have an ID on them which would allow me to assume that the are linked

×
×
  • Create New...

Important Information

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