2019-01-22 15:06:03 (edited by pool 2019-01-22 15:07:23)

hello guys,
so, I have written a code regarding the program of which I told in my previous post.
and, the code is.
void main()
{
int= plus random 1, 1000000)
alert("hello", "lets play maths game");
alert("lets start", "think about any random number");
alert("then", "multiply that number with 2");
alert("then", "add "plus"+ to it");
alert("then", "divide the product with 2");
alert("then", "subtract the number which you thought first time");
alert("answer", "your answer is "plus" /2);
}please help me.

allow me to speak more,
katch me on twitter
if audio games play throughs  and tutorials fascinates you then,
katch me on YouTube

2019-01-22 15:47:11 (edited by nuno69 2019-01-22 15:48:31)

BGT is stupid but I will do an exception and help ya with this sshit.
Here is the fixed code, and I have commented the lines that I have fixed.
void main()
{
//The definition for a variable is as follows: type space name equals sign value. You forgot to open the brace and you forgot to add semicolon at the end of your statement.. You also need to create a second variable which will hold the result. It will look as follows
int plus = random (1, 1000000);
int PlusResult = plus /2;
alert("hello", "lets play maths game");
alert("lets start", "think about any random number");
alert("then", "multiply that number with 2");
alert("then", "add "+plus+" to it");
alert("then", "divide the product with 2");
alert("then", "subtract the number which you thought first time");
alert("answer", "your answer is "+PlusResult+");
}

Raduvay se, raduvay
Raduvay se domaki ne
Kolko liste po gorach
Tolko zdrave na taz kyshcha

2019-01-22 18:19:43

On line: 11 (46)
Line: alert("answer", "your answer is "+PlusResult+");
Error: Non-terminated string literal

allow me to speak more,
katch me on twitter
if audio games play throughs  and tutorials fascinates you then,
katch me on YouTube

2019-01-22 18:30:15

Add one more quuotation mark after the plus sign.

Raduvay se, raduvay
Raduvay se domaki ne
Kolko liste po gorach
Tolko zdrave na taz kyshcha

2019-01-22 23:35:27

like this:
alert("answer","your answer is"+result+"");

blindness is an ability. not a disability.

2019-01-23 23:16:44

The last sequence of +"" is unnecessary.
alert("answer","your answer is"+result);
is sufficient.
Unless of course you want to add a period at the end of the sentence:
alert("answer","your answer is"+result+".");
and I don't think that BGT is stupid.
It's dated, it needs to be updated to support more than just Windows, but it is a great tool for teaching programming to beginners because it can make you feel that you are accomplishing big things fairly quickly. It's all psychological, but I should think that being able to do something fairly significant like play an audio file or even have a character moving around on a game map with just a few lines is something that helps keep motivation up while learning.
If it could run on Mac and supported HRTF it would more or less be cutting edge technology again.

Proud to be the official hosting provider for http://www.vgstorm.com!

Thumbs up

2019-01-24 14:49:33

thanks,
it worked

allow me to speak more,
katch me on twitter
if audio games play throughs  and tutorials fascinates you then,
katch me on YouTube

2019-02-05 14:02:29

hi
as guys sed your coad's problem, i'm here just to say, it have more alert alert alerts
if you could put all in one alert, that can be better

Thumbs up

2019-02-06 10:11:45

I have made these much alert boxes just to ensure that user is going step by step

allow me to speak more,
katch me on twitter
if audio games play throughs  and tutorials fascinates you then,
katch me on YouTube