if (do_name() != 'Home') : ?>
endif ?>
Posted by Tom De Smedt on Oct 20, 2007
When you wrap a string of text in quotes it is interpreted literally, i.e. the character n. What you want here is the contents of the variable named n.
So you need to do:
text(n, 100, 100, 200)When NodeBox executes the text() command it will look up what value is contained in n and draw that to the screen.
Posted by Sisra on Oct 20, 2007
Any clue?
I have tried that too and I'm getting this error in a floating window with buttons to Quit or Continue:
(ValueError: NSInvalidArgumentException - *** -[NSCFNumber length]: selector not recognized)
Here is the hole code:
size(600, 600) colormode(CMYK, range=100) n = random(10, 40) fill(50,50,0,0) font("Tahoma", 36) align(CENTER) text(n, 100, 100, 200)I'm using NodeBox 1.0rc7 with Mac OS 10.3.9.
Any clue?
Posted by Tom De Smedt on Oct 20, 2007
Ah OK. The text() command in the 1.0rc7 version doesn't automatically convert numbers to a string, so you need to do this yourself:
text(str(n), 100, 100, 200)
Posted by Sisra on Oct 20, 2007
include("util/comment.php"); ?>
Now it works!
Thanks.
Random number
Posted by Sisra on Oct 20, 2007Hi!
into the text comand? This doesn't work: Thanks in advanceI'm very new to NodeBox and programing at all and I know what I'm asking for is a very basic task.
How can I get the random number n