|
Post by daniel on May 1, 2021 17:46:57 GMT
When I compile, it shows the error message
/usr/bin/psycc.3.3.2:289:in `is_array_variable?': undefined method `length' for nil:NilClass (NoMethodError)
from /usr/bin/psycc.3.3.2:6015:in `block (2 levels) in
'
from /usr/bin/psycc.3.3.2:4877:in `each'
from /usr/bin/psycc.3.3.2:4877:in `block in
'
from /usr/bin/psycc.3.3.2:4478:in `each'
from /usr/bin/psycc.3.3.2:4478:in `
Can anyone help me? I cannot find any solutions online.
|
|
|
Post by matia on May 1, 2021 19:29:26 GMT
You should provide the entire code. The error is rather inconclusive (it says something about arrays, you should probably take a closer look at your array definitions, but again.. without a code, its hard to tell where the problem is).
|
|
|
Post by daniel on May 2, 2021 4:52:45 GMT
Sorry, I forget to put on my code. Here it is.
bitmaps A1 correct
options background color white mouse on
fonts arial 20
task A text color black text align center show text "LotteryA" -100 -150 show text "LotteryB" 300 -150 set $a 1 keys a b while $a < 11 set $aa expression $a * 10 show text $aa -100 0 show text "%" -90 0 show rectangle -100 200 40 40 green show rectangle 300 200 40 40 blue readmouse l 1 5000 find set $a increase save STATUS RT show bitmap correct delay 3000 clear while-end
block A tasklist A 1 end message A1
|
|
lorenzocroce
New Member
Looking for advice on my last post: randomise a 2 armed bandit task (like in Lockwood et al 2016)
Posts: 1
|
Post by lorenzocroce on Jun 13, 2021 14:52:15 GMT
When I compile, it shows the error message /usr/bin/psycc.3.3.2:289:in `is_array_variable?': undefined method `length' for nil:NilClass (NoMethodError) from /usr/bin/psycc.3.3.2:6015:in `block (2 levels) in ' from /usr/bin/psycc.3.3.2:4877:in `each' from /usr/bin/psycc.3.3.2:4877:in `block in ' from /usr/bin/psycc.3.3.2:4478:in `each' from /usr/bin/psycc.3.3.2:4478:in ` Can anyone help me? I cannot find any solutions online.
Same problem since I've added an image, exact same error.
Is it a size issue?
Anyone heard anything like this before/ knows a workaround?
Here is my code:
options mouse on bitmaps button_a S13 S14
fonts arial 18
task intro show bitmap button_a clear
task igt show bitmap S13 -100 125 show bitmap S14 100 125 readmouse 1 99999 range 1 2 clear 3 set $decisiontime RT set $a under MOUSE_X MOUSE_Y set $fee_or_not &&fees remove random ##take random from list of 1s and 0s set $fee_or_nots &&feess remove random if $fee_or_not == 1 && $a == 1 show text "you win 100 points" -26 -50 255 255 255 set $win 100 fi if $fee_or_not == 0 && $a == 1 show text "no win" -26 -50 255 255 255 set $win 0 fi if $fee_or_nots == 1 && $a == 2 show text "you win 100 points" -26 -50 255 255 255 set $win 100 fi if $fee_or_nots == 0 && $a == 2 show text "no win" -26 -50 255 255 255 set $win 0 fi readmouse l 1 99999 range 1 2 delay 20 clear 3 save $decisiontime $a $fee_or_not $fee_or_nots $win
block test set &&feeset 1 0 0 0 ## button A win given (1)25% or not (0)75% set &&fees &&feeset times 12 ## we need a set of 1s (12x) and 0s (36x) set &&feesets 1 1 1 0 ## button B win given (1)75% or not (0)25% set &&feess &&feesets times 12 ## we need a set of 1s (36x) and 0s (12x) tasklist intro 1 igt 16 end
|
|
silk
Experienced
Posts: 32
|
Post by silk on Jun 13, 2021 21:04:18 GMT
Hey there,
You have both a clear instruction which is not complete, you have to specify what has to be cleared. To clear the whole screen use "clear screen" and not only "clear". See your codes below :
|
|