This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-06-18 14:53:02

waveOSBeta
Scratcher
Registered: 2009-12-08
Posts: 1000+

<online?> block

^^


http://internetometer.com/image/10202.png]
New signature coming soon!  smile

Offline

 

#2 2010-06-18 15:01:38

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: <online?> block

Ill have a go!


You can now reach me on Twitter @johnnydean1_

Offline

 

#3 2010-06-18 15:02:17

waveOSBeta
Scratcher
Registered: 2009-12-08
Posts: 1000+

Re: <online?> block

Thanks!


http://internetometer.com/image/10202.png]
New signature coming soon!  smile

Offline

 

#4 2010-06-18 15:05:10

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: <online?> block

Wait I can make a simple 1

Code:

|t1|
t1_ 0 / 0.
^true


This will report true when using the player but error with everything else!


You can now reach me on Twitter @johnnydean1_

Offline

 

#5 2010-06-18 15:10:49

waveOSBeta
Scratcher
Registered: 2009-12-08
Posts: 1000+

Re: <online?> block

Doesn't work.


http://internetometer.com/image/10202.png]
New signature coming soon!  smile

Offline

 

#6 2010-06-18 15:18:12

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: <online?> block

What do you mean?


You can now reach me on Twitter @johnnydean1_

Offline

 

#7 2010-06-18 15:46:03

waveOSBeta
Scratcher
Registered: 2009-12-08
Posts: 1000+

Re: <online?> block

If Online
Stop Script
Else
Say [Hi!]

Doesn't work.


http://internetometer.com/image/10202.png]
New signature coming soon!  smile

Offline

 

#8 2010-06-18 16:04:35

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: <online?> block

Yes as when used offline it causes a error!


You can now reach me on Twitter @johnnydean1_

Offline

 

#9 2010-06-18 16:31:11

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: <online?> block

johnnydean1 wrote:

will report true when using the player but error with everything else!

waveOSBeta wrote:

If Online
Stop Script
Else
Say [Hi!]

Doesn't work.

Gee, I wonder why, said henley sarcastically.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#10 2010-06-18 17:22:13

climber59
Scratcher
Registered: 2009-12-15
Posts: 100+

Re: <online?> block

New blocks don't work online guys.


Check out my projects if you have a chance.

Offline

 

#11 2010-06-18 19:34:55

TheGameMaster1231
Scratcher
Registered: 2009-07-24
Posts: 1000+

Re: <online?> block

climber59 wrote:

New blocks don't work online guys.

Yesh. So You Might As Well Do

Code:

online
^ false

Offline

 

#12 2010-06-18 20:58:26

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: <online?> block

johnnydean1 wrote:

Wait I can make a simple 1

Code:

|t1|
t1_ 0 / 0.
^true


This will report true when using the player but error with everything else!

this is how it should be:

Code:

online
     | t1 |
     t1 _ 0 / 0.
     [^ true]

just a couple Squeak grammer corrections  tongue


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#13 2010-06-18 21:00:26

waveOSBeta
Scratcher
Registered: 2009-12-08
Posts: 1000+

Re: <online?> block

Is there a valid block or not? I'm making my own Java Player.

Last edited by waveOSBeta (2010-06-18 21:00:39)


http://internetometer.com/image/10202.png]
New signature coming soon!  smile

Offline

 

#14 2010-06-18 21:25:57

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: <online?> block

You can already sort of make this happen without hacking or modifying Scratch in any way  smile  Just divide something by 0; it'll stop the script offline, but it'll keep running online. So something like this will do the trick:

Code:

When Green Flag clicked
set [online] to [0]
set [dummy] to ((16) / (0))
set [online] to [1]

And there y'are.

Offline

 

#15 2010-06-18 21:27:35

waveOSBeta
Scratcher
Registered: 2009-12-08
Posts: 1000+

Re: <online?> block

2 things:

I need one that works offline
A block would look cooler.


http://internetometer.com/image/10202.png]
New signature coming soon!  smile

Offline

 

#16 2010-06-18 21:51:21

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: <online?> block

ScratchReallyROCKS wrote:

johnnydean1 wrote:

Wait I can make a simple 1

Code:

|t1|
t1_ 0 / 0.
^true


This will report true when using the player but error with everything else!

this is how it should be:

Code:

online
     | t1 |
     t1 _ 0 / 0.
     [^ true]

just a couple Squeak grammer corrections :P

I don't believe the "^true" should be bracketed, unless of course you are purposely creating a block, in which case you would most likely use

Code:

[^ true] value

or

Code:

^ [true]

the first returns the value "true" and the second returns a block which, when evaluated with no arguments, returns "true".

Secondly I simply do not understand the reasoning behind this block; if the block doesn't have an online definition, it will not evaluate, so the division by zero will not even occur online. There is nothing you can do except make use of an existing online player glitch or difference, such as a graphics mis-rendering or difference in interpolation methods when using "size".


nXIII

Offline

 

#17 2010-06-18 21:53:20

waveOSBeta
Scratcher
Registered: 2009-12-08
Posts: 1000+

Re: <online?> block

Ahem.

I wrote:

I'm making my own Java Player.


http://internetometer.com/image/10202.png]
New signature coming soon!  smile

Offline

 

#18 2010-06-18 22:04:11

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: <online?> block

waveOSBeta wrote:

Ahem.

I wrote:

I'm making my own Java Player.

Oh, in that case...

In the LOGO commands, put (under "***sensing***"):

Code:

define online [] [true]

and for the Squeak method

Code:

online

    ^ false

nXIII

Offline

 

#19 2010-06-19 05:53:01

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: <online?> block

<offline?>
offline
^ true

Since custom blocks don't work online, this won't be true. Offline, it will be.
Will this work?


/* No comment */

Offline

 

#20 2010-06-19 11:50:07

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: <online?> block

TheSuccessor wrote:

<offline?>
offline
^ true

Since custom blocks don't work online, this won't be true. Offline, it will be.
Will this work?

waveOSBeta wrote:

Ahem.

I wrote:

I'm making my own Java Player.

I already solved the problem a few posts up.

Last edited by nXIII (2010-06-19 11:50:36)


nXIII

Offline

 

#21 2010-06-20 11:04:51

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: <online?> block

nXIII wrote:

TheSuccessor wrote:

<offline?>
offline
^ true

Since custom blocks don't work online, this won't be true. Offline, it will be.
Will this work?

waveOSBeta wrote:

Ahem.

I wrote:

I'm making my own Java Player.

I already solved the problem a few posts up.

Yes, but still, will it work?


/* No comment */

Offline

 

#22 2010-06-20 11:11:02

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: <online?> block

TheSuccessor wrote:

nXIII wrote:

TheSuccessor wrote:

<offline?>
offline
^ true

Since custom blocks don't work online, this won't be true. Offline, it will be.
Will this work?

waveOSBeta wrote:

Ahem.

I already solved the problem a few posts up.

Yes, but still, will it work?

no, that reports "true" when offline.


nXIII

Offline

 

#23 2010-06-20 12:55:47

climber59
Scratcher
Registered: 2009-12-15
Posts: 100+

Re: <online?> block

Yeah but the block he posted said <offline?> not <online?>


Check out my projects if you have a chance.

Offline

 

#24 2010-06-22 09:08:48

bendad
Scratcher
Registered: 2008-06-14
Posts: 100+

Re: <online?> block

TheGameMaster1231 wrote:

climber59 wrote:

New blocks don't work online guys.

Yesh. So You Might As Well Do

Code:

online
^ false

yesh is my word!!!!


Hi!  big_smile
Good to see you. (Even if I don't know you  wink  )

Offline

 

#25 2010-06-22 09:27:14

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: <online?> block

nXIII wrote:

waveOSBeta wrote:

Ahem.

I wrote:

I'm making my own Java Player.

Oh, in that case...

In the LOGO commands, put (under "***sensing***"):

Code:

define online [] [true]

and for the Squeak method

Code:

online

    ^ false

Where you looking in my Scratch Player?  tongue

climber59 wrote:

Yeah but the block he posted said <offline?> not <online?>

-__- It does the same thing.

Last edited by MathWizz (2010-06-22 09:32:11)


http://block.site90.net/scratch.mit/text.php?size=30&amp;text=%20A%20signature!&amp;color=333333

Offline

 

Board footer