inherit
259017
0
Sept 25, 2021 1:54:15 GMT -8
CrazyBoy
Web developer.
968
July 2019
crazyboy
|
Post by CrazyBoy on Dec 24, 2019 1:21:25 GMT -8
Hello, I have used some codes to make quiz game,but i don't know how to make it pass to the next quiz I want in this game: - auto form ( question,answer,if answer is correct"send a positive message",if answer is uncorrect"send a message says try again"). - add money each correct riddle. - lose money each uncorrect money. Here is the code i used without autoform JS <script>
function myFunction() {
var message, x;
message = document.getElementById("msg");
message.innerHTML = "";
x = document.getElementById("ax").value;
try {
if(x == "") throw "empty";
x = Number(x);
if(x != $[plugin.settings.answer]) throw "$[plugin.settings.bad_message]";
if(x = $[plugin.settings.answer]) throw "$[plugin.settings.correct_message]";
}
catch(err) {
message.innerHTML = "Submit Is " + err;
}
}
</script>
<div class="question">$[plugin.settings.question]</div>
<input id="ax" type="text">
<button type="button" onclick="myFunction()">Submit</button>
<div id="msg"></div> Please anyone will make this please make it editable so i can learn
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jan 14, 2020 3:18:35 GMT -8
I would recommend reading my book (it's a sticky in the dev board) so you can get the basics down for creating a plugin, which goes over autoforms in detail. Once you have made some progress, post in the dev plugin board, then we can help guide you.
|
|
inherit
259017
0
Sept 25, 2021 1:54:15 GMT -8
CrazyBoy
Web developer.
968
July 2019
crazyboy
|
Post by CrazyBoy on Jan 14, 2020 3:21:45 GMT -8
Thank You Peter for helping, I am confused on how to change the first autoform to the second in the same one I have added this code which @smithj helped me on via Discrod var math = Math.floor((Math.random() * 'chosen by the plugin') + 1); Where i may put the foreach ? I mean the auto form ID '$[plugin.settings.autoform]'
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jan 14, 2020 3:23:52 GMT -8
If this is something you want to develop yourself, post in the plugin dev or ask a moderator to move this there, that way we can continue discussions in the right place.
|
|
inherit
259017
0
Sept 25, 2021 1:54:15 GMT -8
CrazyBoy
Web developer.
968
July 2019
crazyboy
|
Post by CrazyBoy on Jan 17, 2020 7:35:17 GMT -8
hi Peter sorry for confusing you. But some stuff in the life are happening perhaps. I'd like to develop it myself. I'll do that with another plugin in the future Describ plugin : Display correct or incorrect each time click button of submitting Autoform for questions and answers Not numbers only. Anything like word numbers... Win items or awards or money Use a code to put like myforum.proboards.com/?gameThis shouldn't be hard
|
|