Jump to content
  • 0

Math Prompt


RezaHaxz

Question

Posted
v1 = 1
v2 = 1
test=gg.prompt({"Answer is 2"},nil,{"number"})
if not test then
os.exit()
end
if test[1] == v1 + v2 then
gg.alert("Correct!")
else
gg.alert("Wrong")
end

what wrong?

2 answers to this question

Recommended Posts

Posted

Try it:

15 minutes ago, RezaHaxz said:

v1 = 1 v2 = 1 test=gg.prompt({"Answer is 2"},nil,{"number"}) if not test then os.exit() end if tonumber(test[1]) == v1 + v2 then gg.alert("Correct!") else gg.alert("Wrong") end

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.