You should have posted that first, then the problem had been obvious.

The first thing you learn in the tutorial is, all commands must be inside a function. TEXT* is not a function, its a text definition.

You need a main() function and in that function, among other things you can call your center_text:

credits_txt.pos_x = center_text(credits_str);

I recommend the lite-c tutorial, there you learn how to write programs.