Displaying variables with Font.Draw
Author |
Message |
vertozia
|
Posted: Sat Jan 20, 2007 5:42 pm Post subject: Displaying variables with Font.Draw |
|
|
Hey there, I'm trying to make a scoring system, but i want to make the score bigger, there is a problem
correct is my score variable and is equal to 0, with each correct answer it increases by one. When i want to see the score it gives me an error that i do not know how to correct this (argument is the wrong type. please have a look at my code. I tried defining font . draw with a variable then trying to execute it instead of executing it on the spot, it still didn't work.
Description: |
|
 Download |
Filename: |
math score-error.zip |
Filesize: |
58.16 KB |
Downloaded: |
81 Time(s) |
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
neufelni
|
Posted: Sat Jan 20, 2007 6:19 pm Post subject: RE:Displaying variables with Font.Draw |
|
|
The problem is that your score is an int variable and Font.Draw takes a string as an argument. To solve this problem you just need to convert your int to a string. This is done using intstr:
|
|
|
|
|
 |
CodeMonkey2000
|
Posted: Sat Jan 20, 2007 6:20 pm Post subject: RE:Displaying variables with Font.Draw |
|
|
use intstr(correct)
|
|
|
|
|
 |
vertozia
|
Posted: Sat Jan 20, 2007 8:51 pm Post subject: RE:Displaying variables with Font.Draw |
|
|
cool, thanks a lot, gave you both some random bits.
|
|
|
|
|
 |
|
|