Error in RunAGSGame

Started by Radiant, Sun 06/11/2016 11:42:30

Previous topic - Next topic

Radiant

What does the following error mean:

Error: RunAGSGame: error -3 loading new game file

Radiant

Right, figured it out. Other question: translation files appear to be 'bound' to a game so that they don't work with others. This means that if I used RunAGSgame(), the second game will not be able to use translation files. How do I fix that? It's apparently not based on the name of the executable, nor on the window title (as set in the AGS editor).

Crimson Wizard

#2
Quote from: Radiant on Sun 06/11/2016 12:31:31
Right, figured it out. Other question: translation files appear to be 'bound' to a game so that they don't work with others. This means that if I used RunAGSgame(), the second game will not be able to use translation files. How do I fix that? It's apparently not based on the name of the executable, nor on the window title (as set in the AGS editor).
Do you have both games in same folder? Maybe create translation files with game names as a prefix, like Game1_English.tra, Game2_Francais.tra, and so on.
As for making second game change translation, RunAGSGame allows to pass an arbitrary integer parameter to the next game, you may probably use it to pass translation index.

Also, probably, if you set up same savegame folder for both games (in the General Settings), you can save files into %SAVEGAMEDIR% (and maybe %APPDATADIR% too) and exchange data this way.

Radiant

Yes, the problem is not so much selecting the proper file, but that the file doesn't work. If the translation file is made for game X, and the player starts game Y which uses RunAGSGame() to go to game X, then game X uses SetTranslation(), then this does nothing. No error message, but default English texts are used.

Both games are in the same folder and share the same %savedir%.

Crimson Wizard

I still do not know which translation files you have in that folder. Do you have distinct files for each game, or you are trying to use same file for both games? How those tra files are called?

Radiant

I'm using the same file for both games; I've simply made one by pasting the source text for both into a single text file (as TRS). It's simply called dutch.tra for now.

Radiant

#6
Another unusual issue is that in the called game, the repeatedly_execute_always() function in the global script never gets called. Could you advise on a workaround please?

(edit) the ones in room scripts do work, so the obvious workaround is to cut/paste the REA function to all the room scripts instead.

Crimson Wizard

I have literally no idea what is going on there, so I cannot advise anything atm. I can run a test though when I have time.

Can you tell which version of AGS are you using?

Radiant

3.3.0.1162

Test case: take REA and put a line in there that says RawDrawRectangle(0,0,10,10). Calling the second game directly, this paints the top left of the screen black. Calling the second game from the first, this does not paint the top left of the screen black. Interesting, isn't it?

Radiant

Actually, scratch that. It's interesting but it has an easy workaround. I'm still wondering on how to get the .TRA files to work though.

Crimson Wizard

#10
Did you try the solution I suggested in one of the posts above?
Quote from: Crimson Wizard on Sun 06/11/2016 13:32:21Maybe create translation files with game names as a prefix, like Game1_English.tra, Game2_Francais.tra, and so on.
This is the only solution I can imagine at the moment.

PS. Translation errors are written to the log, they are not displayed as a message box, unless game decides to quit because of them.

Radiant

Quote from: Crimson Wizard on Wed 23/11/2016 20:58:26PS. Translation errors are written to the log, they are not displayed as a message box, unless game decides to quit because of them.

I haven't seen any logs. Yes, I did the prefix trick.

SMF spam blocked by CleanTalk