0
\$\begingroup\$

I am making an intro sequence for my game, but I'm having some difficulty drawing two lines of text. The first line is "DEVELOPED BY:" referenced from a separate language file as "IntroSequence", "DevelopedBy". The next line (made by using + chr(13) + chr(10) +) is my name which I want to be kept static. I would essentially like the user to be able to make different language files being able to change the string reference "DEVELOPED BY:", but not the developer name. Now, I can get the text to draw if I use "DEVELOPED BY:#Mr.Mendelli" in the language file, or keeping both strings static in the script by declaring mytext = get_text("DEVELOPED BY:" + chr(13) + chr(10) +"Mr. Mendelli");. But If I use the second method, the DevelopedBy string cannot be translated in the language resource any more.

When I use the below script, GMS says two arguments are declared, but three are provided:

mytext = get_text("IntroSequence", "DevelopedBy" + chr(13) + chr(10) +"Mr. Mendelli");
image_alpha = 0;
statetime = 0;

How do I use my alias as an unchangeable separate line?

\$\endgroup\$
  • \$\begingroup\$ mytext = get_text("IntroSequence", "MadeBy") + chr(13) + chr(10) +"Mr. Mendelli";? Or even just mytext = get_text("IntroSequence", "MadeBy") + "#Mr. Mendelli"); \$\endgroup\$ – Dmi7ry Aug 26 '17 at 5:35
  • \$\begingroup\$ Of course! I forgot to close the first line, I can't believe I missed that. Thank you for your solution. If you provide it as an answer I'll accept and upvote. \$\endgroup\$ – Mr. Mendelli Aug 26 '17 at 7:07
1
\$\begingroup\$

The closing brace at wrong place. Must be:

mytext = get_text("IntroSequence", "MadeBy") + chr(13) + chr(10) +"Mr. Mendelli";`

or even just

mytext = get_text("IntroSequence", "MadeBy") + "#Mr. Mendelli";
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.