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

Gladox114

Members
  • Content Count

    9
  • Joined

  • Last visited

About Gladox114

  • Rank
    Junior Member

Contact Methods

  • Minecraft
    Gladox114

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yeah for now i just wanted to go a line down if the string contains "\n" in it. its cheap ik I am not allowed to use numbers in gpu.set() but i want so i need to convert however the number to a string.tonumber() converts a string with a number like "10" in to a number like 10. The opposite what i need and i thought that string.format() does the opposite.
  2. When i am in the Lua section and want to use the string.format("%g",num) it works like it should but in my code drawtext not... I want to use gpu.set(x,y,string) but my problem is that i want sometime numbers as strings but i don't know how to convert them properly info who is wondering whats drawText() drawText(print, gpu proxy) is my function that prints something on my second screen with a second graphics card to multi-task
  3. Thx for explaining it because i didn't understood the meaning of tx and ty in the gpu API ^^
  4. The gpu.copy() is a little bit bugged i would say or i use it wrong local c = require("component") local gpu2 = c.proxy(c.get("009")) gpu2.setBackground(0xCC0000) -- setting background to red local x,y = gpu2.getResolution() gpu2.fill(1,1,x,y," ") -- fill the whole screen red gpu2.setBackground(0x000000) -- setting background to black gpu2.fill(1,1,x,y/2," ") -- fill the top half screen black os.sleep(2) gpu2.copy(1,y/2,x,y/2,1,1) -- copy the red half bottom to the half top print(y/2) -- just to check if i calculate something wrong os.sleep(2) And it doesn't work at all as you can see in the picture... I maybe need some examples and tutorials for this.
  5. Gladox114

    Testing nummber

    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
  6. Gladox114

    Testing nummber

    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
×
×
  • Create New...

Important Information

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