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

#1 2011-08-17 05:31:12

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

So, think you could help me out here?

I'm making a blind mode for gopher 2.0. I have the menu code, and a script for if the blind mode is on, then show exit blind mode, and if its off, it shows enter blind mode, and heres what I have done:

Code:

Blind
     ifTrue: [t2 add: 'Exit Blind Mode [+]' action: #exitBlindMode]
     ifFalse: [t2 add: 'Enter Blind Mode [+]' action: #blindMode].

But when I click the menu, I always get this error:
NonBoolen reciever-proceed for truth
Can you give me the code for a menu?
(I was editing the file menu to make that.)


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#2 2011-08-17 05:39:34

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

Re: So, think you could help me out here?

Is Blind always true or false (not "true"or "false) ?


You can now reach me on Twitter @johnnydean1_

Offline

 

#3 2011-08-17 05:57:18

Servine
Scratcher
Registered: 2011-03-19
Posts: 1000+

Re: So, think you could help me out here?

???


http://bluetetrarpg.x10.mx/usercard/?name=Servine

Offline

 

#4 2011-08-17 06:00:16

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: So, think you could help me out here?

teh default value is false, not "false".


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#5 2011-08-17 06:36:43

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: So, think you could help me out here?

what does blind mode do?


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#6 2011-08-17 07:46:26

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: So, think you could help me out here?

It makes all the blocks and text bigger for people with bad eyesight.


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#7 2011-08-17 09:08:21

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: So, think you could help me out here?

The error you're getting means that Squeak doesn't know whether the variable is true or false -- it's just something else. To avoid this, I always use (variable = true) instead of just (variable). Still, there's something wrong with the code. Either you forgot to set a default for the variable, or the method can't access the variable properly.

Offline

 

#8 2011-08-17 09:25:07

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: So, think you could help me out here?

The variable works, I put this code in the startup method:

Code:

Blind _ false

so tht should make it false at the start.

Last edited by WindowsExplorer (2011-08-17 09:27:08)


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#9 2011-08-17 09:50:32

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: So, think you could help me out here?

WindowsExplorer wrote:

The variable works, I put this code in the startup method:

Code:

Blind _ false

so tht should make it false at the start.

Never know. Just use my (Blind = true) method, and check if the ticking works.

Offline

 

#10 2011-08-17 09:56:02

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: So, think you could help me out here?

Thank you, it worked! I for got the blind = condition part, I just had
Blind
    ifTrue: [^]

lol!


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#11 2011-08-17 10:03:48

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: So, think you could help me out here?

WindowsExplorer wrote:

Thank you, it worked! I for got the blind = condition part, I just had
Blind
    ifTrue: [^]

lol!

It should work normally, but obviously it didn't initialize the variable properly. So you didn't forget anything  smile

Offline

 

#12 2011-08-17 23:30:38

ozzy1225
New Scratcher
Registered: 2011-08-16
Posts: 2

Re: So, think you could help me out here?

quick question,,,, how do you use "left click" for aiming something in a shooter?

Offline

 

#13 2011-08-18 00:30:31

veggieman
Scratcher
Registered: 2011-08-12
Posts: 100+

Re: So, think you could help me out here?

ozzy1225 wrote:

quick question,,,, how do you use "left click" for aiming something in a shooter?

Please remember to keep your posts on topic.


Some days, I wish that my posts would stop disappearing

Offline

 

#14 2011-08-18 03:22:51

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: So, think you could help me out here?

veggieman wrote:

ozzy1225 wrote:

quick question,,,, how do you use "left click" for aiming something in a shooter?

Please remember to keep your posts on topic.

Yeah, please post your own topic (in the correct section, which in this case is All About Scratch) and not spam others' threads.

Anyway, there is no way to check whether the player is using the left or right button, but you can use the mouse down block for an 'any button pressed'. [blocks]<mouse down?>[/blocks]

Offline

 

#15 2011-08-18 03:35:12

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: So, think you could help me out here?

LS97, when will you be adding the other mods? And by the way, MegaMod isn't programmed to do anything once the compile or upload button is clicked!


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#16 2011-08-18 03:40:29

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: So, think you could help me out here?

WindowsExplorer wrote:

LS97, when will you be adding the other mods? And by the way, MegaMod isn't programmed to do anything once the compile or upload button is clicked!

I should know -- I programmed both of them. I just didn't add functionality to them yet.

Offline

 

#17 2011-08-18 03:43:58

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: So, think you could help me out here?

I need help. When I'm adding a new menu, for example settings, it shows up like this, without a space: HelpSettings.


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#18 2011-08-18 04:07:46

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: So, think you could help me out here?

WindowsExplorer wrote:

I need help. When I'm adding a new menu, for example settings, it shows up like this, without a space: HelpSettings.

Ah, yes. Lower down in the menu adding code, you'll find a loop that adds spacers after each menu, unless this menu is called help. So just change the name help to whatever the last one is and you're set.

Offline

 

#19 2011-08-18 04:12:18

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: So, think you could help me out here?

kk


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

Board footer