|
#21
|
||||
|
||||
|
I read those articles and wrote the following code. I don't understand why it doesn't work..
Code:
-- get the previous highscores
file = io.open("highscore.txt", "r");
highscore = file:read("*n");
file:close();
Code:
text.draw(304,48,tostring(highscore)); Thank you in advance
|
| Advertisement | [Remove Advertisement] |
|
|
|
|
#22
|
|||
|
|||
|
Hi,
Not sure exactly what the problem is... Does this give an "Error Occured" error, rather than just not working as expected? If so, you might want to try catching the error using pcall. You might use something like: Code:
function wrappedCode(argument) -- Your code here, instead of the error line error "This would not be here if you had some code!" end success, message = pcall(wrappedCode, "String as argument") Hope that helps! |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 05:04 PM.











Linear Mode
