program has become too complicated for LOADFONT()

Blitz3D Forums/Blitz3D Programming/program has become too complicated for LOADFONT()

Crinkle(Posted 2011) [#1]
This is utterly bizzarre! I have a B3D program which appears to have become so complex that loadfont will no longer work. It globally loads a range of fonts, which are then picked in the program and its subfunctions.

The parts of code which are not working aren't new pieces of code, they havent changed in quite a while. They were working up untill about 30 minutes ago but now it will error with "font does not exist". The font does exist i've verified that! I've also made a small test program consisting of:

fnt1=LoadFont("Arial",24)
SetFont fnt1
Print "Hello you cruel world!"
Delay 2000

Which works!

So it really seems that the program has just become too complex for LOADFONT() commands. My question is, has anyone else had this error or experienced something similar, and if so, how did you get round it?


Yasha(Posted 2011) [#2]
Seriously, why do all your posts pick fault with the rock-solid application that has built thousands of correspondingly rock-solid applications for over ten years now? The problem is not with LoadFont.

That said (*Yasha tries desperately to keep cool*), why don't you walk through your changes over the last half-hour? Or post an extract of the changed section which the rest of us can try to examine? Fresh eyes can often spot the tiny but important things quite quickly.

(Protip: If you're still using the default editor, stop now and go and download IDEal - it has an undo button, which will save you many hours of frustration. Why this basic feature is missing from the builtin editor I don't know.)

Last edited 2011


Crinkle(Posted 2011) [#3]
I will try that editor thanks. Blitz is horribly ugly!

The bad bit of programming has turned up as it always does; ONLY after making a post about it being wrong! Turns out i was calling a font-using function before the fonts were loaded, easily fixed tho!


Axel Wheeler(Posted 2011) [#4]

Seriously, why do all your posts pick fault with the rock-solid application that has built thousands of correspondingly rock-solid applications for over ten years now? The problem is not with LoadFont.



Welllll.... I wouldn't say Blitz3D is rock solid. It's rock solid except for all the slippery bits. He didn't actually say LoadFont was the culprit. The error sounds like SetFont barfing at a variable that wasn't set to a font yet. So his error was here:


The parts of code which are not working aren't new pieces of code, they havent changed in quite a while.



Clearly they had just changed, but he had forgotten. Oh, well.

Regarding IDeal, I notice that the default IDE often fails to highlight the error, and doesnt have line numbers or any other indication of where the error was. When IDeal is used it just throws a mav for runtime errors unless debug compile mode is used, in which case it opens the default ide anyway.

IDeal shines when it comes to compile time errors. It tells you the error, displays the line number, highlights it, and smacks your peepee. Well, three of those four.


Warner(Posted 2011) [#5]
Maybe you are now setting Graphics after loading the font? Using Graphics will destroy any loaded media.


Yue(Posted 2011) [#6]
most errors are not blitz3d, I can say that almost all errors are rather logic.

For that scares me to think programming in C + +: (

These days I step on the basis of my ignorance I made a conditional statement to detect the user's age and thus enter the system. What was my surprise to see that if the data entered the computer age of 18 said it was minor, when the legal age in Colombia to be greater than 18 years, after drinking a cup of coffee can detect that the problem was in my head.

if Age > 18 
end if 
;Incorrect
if Age =>18
end if
;Correct 


In some ways set means having a great skill that developed over time to solve problems, and the editor Ideal working a lot.

Whether Blitz3D is like a rock?, unfortunately a user considers a program, a programmer is judged by a language, just if you have Blitz3D and nothing is done, make sure not to play, no creativity and decisions will not increase nothing has been told by programming.

therefore, every day try to improve the expertise to find solutions in programming.

Last edited 2011


Axel Wheeler(Posted 2011) [#7]
Warner: I think he solved his problem; he was calling setfont before loadfont

Yue: Good points. C++, Java and C# are very powerful languages (that you can get paid a lot to know) but they involve a lot more researching the vast oceans of other add-ons built around them, for everything you need to do. With Blitz you are working with a standard set of commands. Large but finite.

With C#, say, you have to connect to different kinds of classes for different things you want to do, and each class has its own complexities and documnentation. When you install .Net, for example, you get over 1G of documentation (that's over one billion bytes). And that was the earlier version; I don't know about today. And of course there are huge numbers of third-party add-ons.

But of course you only need to look up what you need. Give it a try...


Yue(Posted 2011) [#8]
@Axel Wheeler:
Hello, you're right in everything you say, obviously everything depends on the user and the circumstances, but my biggest limitations are that I do not speak English and learn computer science is based on English, the other thing is I'll always be a fan this, I do not think it possible to learn c + + or Java, because my circumstances did not allow, starting because I have no Internet at home and if reaches blitz3d was simply by choice, because I started with a program called Entidad3D, then a call Unity RealityFActory Then try but I get stuck because it asks too machine.

Now, I could do what I do now with Blitz3D, take a USB stick and take it home, use a translator for We understand C + +, directX calls, maybe I could do as long as I had a better pc.

Another issue that I think all those developers who come to c + +, Java, etc, are to travel at some point in their life at an early age got into this. I repeat I will always be a fan Blitz3D, simply because it is what is within my reach, thanks to Oscar to cancel the money from the license along with FastLibs =).


Mahan(Posted 2011) [#9]
@Yue:

Yes English is very important in computer science.

But English is also important on most of the rest of the Internet, so learning it is a huge advantage for your future life tbh. regardless of programming. :)