Hi--
I'm fairly new at this; I hope this hasn't been answered a hundred
times. Why do I get a pink screen from the code below, which just draws
a line from (2,2) to (2,4)? The graph displays correctly, but I get a
pink screen and the error message at the bottom of this post. Thanks in
advance for any help,
Steve
#######################################
DOCUMENT();
loadMacros(PG.pl, PGbasicmacros.pl, PGchoicemacros.pl, PGanswermacros.pl, PGauxiliaryFunctions.pl, PGgraphmacros.pl);
$showPartialCorrectAnswers = 0;
# make a 'canvas' on which to draw
$g = init_graph(0,0,10,10);
# draw a line
$g->moveTo(2,2);
$g->lineTo(2,4);
TEXT(image(insertGraph($g), width => 400, height => 400, tex_size => 800));
BEGIN_TEXT
$BR
Is this really going to work? {ans_rule(5)}
$BR
END_TEXT
ANS(str_cmp("Yes"));
ENDDOCUMENT();
#######################################
The error message:
* Use of uninitialized value in pattern match (m//) at /home/webwork2/webwork/system_1.9_05/courseScripts//WWPlot.pm line 369.
##More details:
-------- WWPlot::lineTo called at (eval 57) line 17
---- Safe::Root2::__ANON__ called at /home/webwork2/local/lib/perl5/5.6.1/sun4-solaris/Safe.pm line 222
---- Safe::reval called at /home/webwork2/webwork/system_1.9_05/courseScripts//WeBWorK/PG/Translator.pm line 858
---- WeBWorK::PG::Translator::translate called at /home/webwork2/webwork/system_1.9_05/cgi/cgi-scripts/processProblem8.pl line 466
<| Post or View Comments |>
|