Difference between revisions of "Talk:Os.queueEvent"
From ComputerCraft Wiki
(Created page with "Is the Code supposed to not output hello when a redstone current comes? --~~~~") |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Is the Code supposed to not output hello when a redstone current comes? | Is the Code supposed to not output hello when a redstone current comes? | ||
--[[User:Banane9|Banane9]] 15:21, 12 July 2012 (UTC) | --[[User:Banane9|Banane9]] 15:21, 12 July 2012 (UTC) | ||
+ | :It is supposed to output "Hello" when a redstone current from the left side comes or when the player hits Enter - which works for me --[[User:Pinkishu|Pinkishu]] 14:35, 13 July 2012 (CEST) | ||
+ | :: if event == "redstone" then | ||
+ | if rs.getInput("left") then | ||
+ | os.queueEvent("key",28) | ||
+ | end | ||
+ | elseif event == "key" then | ||
+ | if param1 == 28 then | ||
+ | print("Hello") | ||
+ | end | ||
+ | end | ||
+ | ::but the code says elseif, so i wonder why that would be executed when the event is redstone. | ||
+ | :::Oh ok the while true loop and qeue event -.- | ||
+ | --[[User:Banane9|Banane9]] 14:33, 13 July 2012 (UTC) |
Latest revision as of 14:33, 13 July 2012
Is the Code supposed to not output hello when a redstone current comes? --Banane9 15:21, 12 July 2012 (UTC)
- It is supposed to output "Hello" when a redstone current from the left side comes or when the player hits Enter - which works for me --Pinkishu 14:35, 13 July 2012 (CEST)
- if event == "redstone" then
if rs.getInput("left") then os.queueEvent("key",28) end elseif event == "key" then if param1 == 28 then print("Hello") end end
- but the code says elseif, so i wonder why that would be executed when the event is redstone.
- Oh ok the while true loop and qeue event -.-
- but the code says elseif, so i wonder why that would be executed when the event is redstone.
--Banane9 14:33, 13 July 2012 (UTC)