It did not work. It does not accept the meathod.
Offline
johnnydean1 wrote:
It did not work. It does not accept the meathod.
Try getting rid of the t1 in your temp vars. If it doesn't work, what's the error message?
Offline
I'm not sure what that means, but I tried it and it worked. At least I think, I'm not entirely sure what the purpose of the block is, but it seems to work. method:
getVarfromMesh: t1
| t2 t3 t4 |
(t2 _ self ownerThatIsA: ScratchStageMorph) ifNil: [^ 0].
t2 scratchServer
ifNotNil:
[t3 _ t2 scratchServer sensorValueFor: t1.
t3 ifNotNil: [^ t3]].
'tilt' = t1 ifTrue: [^ WeDoPlugin tilt].
'distance' = t1 ifTrue: [^ WeDoPlugin distance].
t4 _ t2 sensorBoard.
t4 tryToOpenPort ifFalse: [^ 0].
^ t4 sensor: (self indexForSensorName: t1)
block spec:
('get %v from mesh' #- #getVarFromMesh:)
Hope it works!
Offline
I had a go at it, I stuck my IP in there insted of scratch server. It didn't glow red, just gave me the syntax error.
ScratchSpriteMorph as yet unclassified |
| t1t1 t2 t3 t4 |
t1 _ 'a variable'.
(t2 _ self ownerThatIsA: ScratchStageMorph) ifNil: [^ 0].
t2 Nothing more expected ->192.168.1.4
ifNotNil:
[t3 _ t2 192.168.1.4 sensorValueFor: t1.
t3 ifNotNil: [^ t3]].
'tilt' = t1 ifTrue: [^ WeDoPlugin tilt].
'distance' = t1 ifTrue: [^ WeDoPlugin distance].
t4 _ t2 sensorBoard.
t4 tryToOpenPort ifFalse: [^ 0].
^ t4 sensor: (self indexForSensorName: t1)Last edited by markyparky56 (2010-06-02 16:35:20)
Offline
I know. Its stupid, it works fine on Panther, but not on a mod
Offline
The one I made didn't glow red, it seemed to work. It didn't do anything, though I wasn't connected to mesh and didn't have any variables when I tried it.
Offline
Your one does not show a error, but does not work either.
Offline
oh, okay. weird. maybe some of Panther's stuff that is used in it have been edited.
Offline
johnnydean1 wrote:
Your one does not show a error, but does not work either.
Who are you talking to?
Zorbak42 wrote:
oh, okay. weird. maybe some of Panther's stuff that is used in it have been edited.
A lot of things have been changed in Panther.
Offline
JD1 was talking to me, MP56. Yes, a lot of things have changed, but I meant something specific to things in the code for JD1's custom block.
Offline
Zorbak42 wrote:
JD1 was talking to me, MP56. Yes, a lot of things have changed, but I meant something specific to things in the code for JD1's custom block.
Strange... aren't variables shared anyway?
Offline
bharvey wrote:
How do you pronounce "nXIII"? (The logo looks like "n to the 13th power" but that seems like quite a mouthful.)
I normaly think of it like n-X-3
Offline
I pronounce it N-X-I-I-I
as in 3 of the letter I
Offline
bharvey wrote:
How do you pronounce "nXIII"? (The logo looks like "n to the 13th power" but that seems like quite a mouthful.)
m... er... I mostly think it, not say it, so I don't really know. It IS n to the thirteenth power, but that IS a bit too long. I've seen Sep spell it en-ex-triple-eye, and some just n13, that kind of works, in dropbox I just use "n".
Offline