Jump to content


remiX's Content

There have been 469 items by remiX (Search limited from 10-February 22)


By content type

See this member's


Sort by                Order  

#98515 [WIP] YugoOS

Posted by remiX on 18 March 2013 - 04:44 AM in Operating Systems

Dafuq? Money?
What is this...



#96449 [whats wrong] <<explains

Posted by remiX on 12 March 2013 - 05:39 PM in Ask a Pro

If it's in DISK then you need
desk = paintutils.loadImage(".desktop")
to be
desk = paintutils.loadImage("disk/.desktop")



#95990 [whats wrong] <<explains

Posted by remiX on 11 March 2013 - 05:45 PM in Ask a Pro

Where EXACTLY did you put the .desktop file?



#112667 [Turtle] End to close if at line..

Posted by remiX on 21 April 2013 - 08:20 AM in Ask a Pro

If you indent your code, you get this:

function diggy()
    while turtle.detect() do
        turtle.dig()
        turtle.forward()
    end
end

while not turtle.detect() do
    turtle.turnRight()
    if turtle.detect() then
        turtle.dig()
        turtle.forward()
        turtle.turnRight()
        if turtle.detect() then diggy()
            if not turtle.detect() then
                turtle.turnLeft()
            end
        else
            turtle.turnLeft()
            if turtle.detect() then
                turtle.dig()
                turtle.forward()
                turtle.turnLeft()
                if turtle.detect() then
                    diggy()
                    if not turtle.detect() then
                        turtle.turnRight()
end

Yeah.. quite a few missing ends :)/>

edit: Lol damn you kingdaro!



#107062 [Symmetryc's Programs] New XUtils API!

Posted by remiX on 07 April 2013 - 05:59 AM in Programs

Ooh the options are nice!
Nice works :P

Now to get the actual rpg mechanics to work :P



#106706 [Symmetryc's Programs] New XUtils API!

Posted by remiX on 06 April 2013 - 03:46 AM in Programs

Errors with anything I click.
After downloading and running once, errors with File not found



#106786 [SOLVED] Why Wont My Code Work?

Posted by remiX on 06 April 2013 - 08:22 AM in Ask a Pro

I'll take a bet that a problem you're having is that it never reads that it's lights_off when it is?
This is because once you readAll the first time, there is nothing to read anymore so it will be nil. (Didn't even read OP until after I said this :P)

while true do
	local command = http.get("http://24.152.212.26:8080/tropo/command.txt")
	local status = command.readAll()
	print( status ) -- debug
	if status == "lights_on" then
		rs.setOutput("back", true)
	elseif status == "lights_off" then -- elseif statement ! :)/>
		rs.setOutput("back", false)
	end
	
	--[[ You simply, you could do this:
	rs.setOutput( "back", status == "lights_on" )
	-]]
end

Always have a debug line which prints something so you know what is wrong.

If you are using a free webhoster, their might be extra code at the end of the page that readAll() will catch, you will need to use string.gsub to remove it.



#116056 [Solved] Problem with events

Posted by remiX on 07 May 2013 - 12:26 PM in Ask a Pro

Try moving
  local shortcutTimer
  local shortcutTimeout = 0.4
  local shortcutMode = false
out of the while loop, above it



#116962 [Solved] os.pullEventRaw not working with parallel

Posted by remiX on 11 May 2013 - 06:08 AM in Ask a Pro

Small exampe?



#113767 [Solved] menu becoming laggy after a while

Posted by remiX on 24 April 2013 - 04:37 AM in Ask a Pro

After how long does it start lagging? I left it for about a minute and it was fine.

Maybe set the delay to 1 second and rather do it this way:
local selector = 1
local heatChecker = os.startTimer(1) -- start a timer for 1 second to check the heat of reactor.

while true do
  menuDraw(selector)
  local e = {os.pullEvent()}
  if e[1] == "key" then
    if e[2] == keys.down then
      selector = selector < #menu_options and selector+1 or 1
    elseif e[2] == keys.up then
      selector = selector > 1 and selector-1 or #menu_options
    elseif e[2] == keys.enter then
      if selector == 1 then
        m.transmit(1, 1, "start")
        term.setTextColor(colors.green)
        term.setCursorPos(1, termY)
        term.write("Le reacteur est demarre.     ")
      elseif selector == 2 then
        m.transmit(1, 1,"stop")
        term.setTextColor(colors.red)
        term.setCursorPos(1, termY)
        term.write("Le reacteur est arrete.      ")
      elseif selector == 3 then
        break
      end
    end
  elseif e[1] == "timer" and e[2] == heatChecker then
    heatChecker = os.startTimer(1)
    if verifheat() then
      error = "Mauvaise carte dans le lecteur !"
      break
    end
  end
end
Change the part from local selector = 1 in your code to the end of the while loop to this



#113781 [Solved] menu becoming laggy after a while

Posted by remiX on 24 April 2013 - 05:10 AM in Ask a Pro

Oh quite a few minutes.. hmm..

I haven't really worked with coroutines so not sure.

Btw I had the os.startTimer(0.2) still in the loop, don't forget to remove it :P



#102677 [SCREENSHOTS!] [CC City] ComputerCraftia

Posted by remiX on 28 March 2013 - 12:44 AM in Media

Lol take down poll until you actually post the pictures



#114132 [Restored] How to make a Graphical and Object Oriented OS

Posted by remiX on 01 May 2013 - 11:10 AM in Tutorials

Tut code is broken



#93089 [Question]How do I turn rednet messages into redstone signals?

Posted by remiX on 04 March 2013 - 03:59 AM in Ask a Pro

View PostSenmori, on 04 March 2013 - 12:49 AM, said:

You might want to check out the Rednet, Os.pullEvent(), and Redstone API pages.

As for how to do it, well if I gave you the code then you wouldn't learn anything.

I would suggest waiting for an event(os.pullEvent() or rednet.receive()) until a certain message is received and if that message is what you want then do a certain action(redstone signals).

If you don't want to learn then click the spoiler for an idea of how to do it :
Spoiler

senderID is a number, not a string



#96909 [QUESTION][HELP]Coding.

Posted by remiX on 14 March 2013 - 03:40 AM in Ask a Pro

View Postsubzero22, on 14 March 2013 - 03:31 AM, said:

View PostBubba, on 14 March 2013 - 12:59 AM, said:

SNIP

Is that script protected by ctrl+T? if so I'd love to use it.

Add this at the top
oldPull = os.pullEvent
os.pullEvent = os.pullEventRaw

and this at the bottom:

os.pullEvent = oldPull



#113783 [Question] Setting the text scale of the computer.

Posted by remiX on 24 April 2013 - 05:14 AM in Ask a Pro

Use ascii art :)

Text to ASCII art Generator



#103462 [QUESTION] Scrollbar?

Posted by remiX on 30 March 2013 - 01:21 AM in Ask a Pro

Big buttons like buttons that take 3 lines or 1?

Always good to show your code so you can see what you have done wrong :)



#108506 [Question] Login, Register computercraft

Posted by remiX on 10 April 2013 - 10:01 AM in Ask a Pro

View PostSmiley43210, on 10 April 2013 - 09:09 AM, said:

Use input() for asking for information. This allows the user to type text in, and the text is returned when he/she presses enter. Example:
write("Enter a username. Press enter to continue.")
local username = read()
write("Your username is "..username)
Explained without spoon feeding. :P

Hmmm... :P



#94400 [Question] How can I make text show on a computer screen and a monitor screen...

Posted by remiX on 08 March 2013 - 08:47 AM in Ask a Pro

View PostJokerRH, on 07 March 2013 - 10:31 AM, said:

View Postboudragon, on 07 March 2013 - 10:18 AM, said:

How would that be solved if possible?

function set(ind)
  if type(term[ind]) ~= "function" then return end

  term[ind] = setmetatable({term = term[ind], monitor = m[ind]}, {
		__call = function(self, ...)
		  self.term(...)
		  self.monitor(...)
		end
  })
end
This additional line will detect if term[ind] is a function. If it is already modified it is a table and will not be set twice

Try that.

Source: http://www.computerc...or/page__st__40

Look at the code there and how to use it. I think that's what you're looking for.



#113719 [Question] Encrypt a string from input?

Posted by remiX on 24 April 2013 - 01:40 AM in Ask a Pro

They need to be in " " btw :P

But don't use this, it isn't secure at all...
Something like this would be better



#113747 [Question] Encrypt a string from input?

Posted by remiX on 24 April 2013 - 03:10 AM in Ask a Pro

View PostMackan90096, on 24 April 2013 - 03:04 AM, said:

Is there a decryption using this too?

Yes, this would be the decryption function.
function decrypt(str)
	local temp = ""
	for i = 1, str:len() do
		local char = str:sub(i,i)
		for i, v in pairs(lookup) do
			if v == char then temp = temp .. char break end
		end
	end
	return str
end

Untested



#115228 [Question] A little question :P

Posted by remiX on 04 May 2013 - 09:47 PM in Ask a Pro

View PostFreack100, on 04 May 2013 - 05:49 PM, said:

What did you mean with "forever"?

the anti-terminate:
OldPullEvent = os.pullEvent --backup the os.pullEvent
os.pullEventRaw -- override the os.pullEvent
--Put this code at the top of your program

--If you want to disable the anti-terminating, do this:
os.pullEvent = OldPullEvent

I hope It's helpfull for you :)/>
Second line should be
os.pullEvent = os.pullEventRaw

As for the permanent text, just have it print and if you don't want it to stop and have it so you can type add this to the end:
while true do
    sleep(60)
end



#96448 [quesion]

Posted by remiX on 12 March 2013 - 05:38 PM in Ask a Pro

Do 'edit' <program name of the paint file> and fill in the edges there and it should be fine :)



#96060 [Open Source] PearOS (Preview 2) - OS X Inspired OS

Posted by remiX on 11 March 2013 - 11:04 PM in Operating Systems

View PostTheOriginalBIT, on 11 March 2013 - 06:03 PM, said:

View PostremiX, on 11 March 2013 - 06:01 PM, said:

I would suggest that you save everything into one folder, right now there's two, system and home - just clatters the users' pc folder.
Have you seen the Mac OS X file system?
Woops, forgot that it's meant to be like mac os x.
And no, I haven't seen the file system on mac os :P



#95991 [Open Source] PearOS (Preview 2) - OS X Inspired OS

Posted by remiX on 11 March 2013 - 06:01 PM in Operating Systems

I would say this is the best OS i've seen here so far, it have a lot xD

I would suggest that you save everything into one folder, right now there's two, system and home - just clatters the users' pc folder.
And don't make the file startup because that's annoying xD

And make an installer!