SOLVED - SetSpeechFont Problem. Thanx!!

Started by Docoptik, Thu 30/06/2005 02:40:31

Previous topic - Next topic

Docoptik

I have to confess that i am a beginner.And i mean VERY BEGINNER ;D
I have AGS 2.7 I know from "help" that there is a function SetSpeechFont.
I know by default that the SpeechFont is font 1.
I have added a font (it shows on the screen at the font bar as Font 3).
I want to change before the game begins to font 3
but i don't know what to do!! >:( >:( >:(
I mean i wrote SetSpeechFont (3); in the global or header script and i take as answer a compile error window such as:
"There is an error compling your script. The problem was in :'script header'
error (line 6):Parses error:unexpected 'SetSpeechFont'
do you want to fix...."
What am i doing wrong??? ??? ???
please help.
Thanx

Gilbert

You cannot call a function outside of any functions (like in the script header say for example). You can only do simple stuff like variable declations outside of a function.

Edit the global script, and look for the function game_start(), add your code inside of that function, like this:
function game_start() {
  // called when the game starts, before the first room is loaded
  SetSpeechFont (3);
}

SMF spam blocked by CleanTalk