poll program
hawkwand 14 Jan 2017
So I'm trying to make a poll program where player get on the computer it tells them the poll number and the question, then below that it will have answer and quit
Poll 01
Question: What do you think of Minecraft?
[answer] [quit]
if they hit answer it will take them to a writing area where they can type up their answer, then his print and it will be printed.
the only thing is I don't know how to get it to where they can click on answer or quit and once there done and hit quite how to get it to go back to the beginning.
I'm also doing this on a server that does allow you to download programs off Pastebin and it is on tekkit lite which is version 1.4.7 of Minecraft,
So this is what i have so far
startup
shell.run("poll")
poll
term.setCursorPos(1, 1)
print("Poll 01 ")
term.setCursorPos(1, 3)
print("Question: what do you think of minecraft?")
term.setCursorPos(15, 10)
print("[Answer]")
term.setCursorPos(30, 10)
print("[Quit]")
Answer
shell.run("edit pollA")
Quit
shell.run("delete pollA")
os.shutdown()
Edited by hawkwand, 16 January 2017 - 05:13 AM.
Poll 01
Question: What do you think of Minecraft?
[answer] [quit]
if they hit answer it will take them to a writing area where they can type up their answer, then his print and it will be printed.
the only thing is I don't know how to get it to where they can click on answer or quit and once there done and hit quite how to get it to go back to the beginning.
I'm also doing this on a server that does allow you to download programs off Pastebin and it is on tekkit lite which is version 1.4.7 of Minecraft,
So this is what i have so far
startup
shell.run("poll")
poll
term.setCursorPos(1, 1)
print("Poll 01 ")
term.setCursorPos(1, 3)
print("Question: what do you think of minecraft?")
term.setCursorPos(15, 10)
print("[Answer]")
term.setCursorPos(30, 10)
print("[Quit]")
Answer
shell.run("edit pollA")
Quit
shell.run("delete pollA")
os.shutdown()
Edited by hawkwand, 16 January 2017 - 05:13 AM.
Bomb Bloke 15 Jan 2017
Difficult to comment on how you might add that to your code if we can't see your code. What have you got so far?
hawkwand 15 Jan 2017
Someone on the server gave me this program but I don't know what to do with it.
while true do
event, param, x, y = os.pullEvent()
-- x and y are mouse positions
-- if mouse is pos
-- get answer
-- else if is in pos B
-- break <-- this is exit
end
end
end
Edited by hawkwand, 16 January 2017 - 05:16 AM.
while true do
event, param, x, y = os.pullEvent()
-- x and y are mouse positions
-- if mouse is pos
-- get answer
-- else if is in pos B
-- break <-- this is exit
end
end
end
Edited by hawkwand, 16 January 2017 - 05:16 AM.
roger109z 16 Jan 2017
hawkwand, on 15 January 2017 - 04:33 AM, said:
Someone on the server gave me this program but I don't know what to do with it.
while true do
event, param, x, y = os.pullEvent()
-- x and y are mouse positions
-- if mouse is pos
-- get answer
-- else if is in pos B
-- break <-- this is exit
end
end
end
while true do
event, param, x, y = os.pullEvent()
-- x and y are mouse positions
-- if mouse is pos
-- get answer
-- else if is in pos B
-- break <-- this is exit
end
end
end