4 posts
Posted 18 May 2014 - 12:46 PM
Hello! I am trying to make a script that (for now it uses random numbers) will show the in game time. The problem i have (it is not very big, but I can't seem to get it working) is that the ':' in the time is not flashing every second. My code is at this link;
http://pastebin.com/nKXHmr9zEDIT: Updated the link.
Edited on 18 May 2014 - 02:12 PM
350 posts
Posted 18 May 2014 - 02:58 PM
The pastebin has been removed. If you want to make it flash you will need to use sleep(1) and make it blink every second. There are a few ways of doing this, if i have a look at your code i can tell you the best way.
4 posts
Posted 18 May 2014 - 05:04 PM
The pastebin has been removed. If you want to make it flash you will need to use sleep(1) and make it blink every second. There are a few ways of doing this, if i have a look at your code i can tell you the best way.
I updated the pastebin link.
1190 posts
Location
RHIT
Posted 18 May 2014 - 06:57 PM
The pastebin has been removed. If you want to make it flash you will need to use sleep(1) and make it blink every second. There are a few ways of doing this, if i have a look at your code i can tell you the best way.
I updated the pastebin link.
No you didn't. The link is still broken.
197 posts
Location
Czech Republic
Posted 18 May 2014 - 07:50 PM
The link should be
http://pastebin.com/nKXHmr9zHere you go
local hours=12
local minutes=8
local function c()
term.clear()
term.setCursorPos(1,1)
end
while true do
write(hours..":"..minutes)
sleep(1)
c()
write(hours.." "..minutes)
sleep(1)
c()
end
Edited on 18 May 2014 - 05:55 PM
656 posts
Posted 18 May 2014 - 08:38 PM
It works for me… Are you having lag issues or something? Or does it give an error?
4 posts
Posted 18 May 2014 - 09:18 PM
The link should be
http://pastebin.com/nKXHmr9zHere you go
local hours=12
local minutes=8
local function c()
term.clear()
term.setCursorPos(1,1)
end
while true do
write(hours..":"..minutes)
sleep(1)
c()
write(hours.." "..minutes)
sleep(1)
c()
end
Thank you. This solved my problem. I just changed your term.clear() to term.clearLine(). Thank you. And no, i don't have lag issues.
350 posts
Posted 19 May 2014 - 08:44 AM
lol he updated the text but not the link XD
4 posts
Posted 19 May 2014 - 02:20 PM
lol he updated the text but not the link XD
As you might tell i'm quite new to this forum. ;p
350 posts
Posted 19 May 2014 - 07:42 PM
lol he updated the text but not the link XD
As you might tell i'm quite new to this forum. ;p
Ah, its just html. You delete the previous link (the full url from the http:// to the pastebin code) and then click on the link button under the size tab in the editor ( you can select text to be like a button ) and paste there your url. If you select a text, lets say "hello world" and click on the link you can now paste there a link to a website, in this case i will paste the youtube website. The result is:
hello worldHope you get it :)/> any question just shoot.
Edited on 19 May 2014 - 05:43 PM