wesnoth program execution result

Discussion of all aspects of the game engine, including development of new and existing features.

Moderators: Forum Moderators, Developers

Post Reply
spir
Posts: 97
Joined: September 15th, 2009, 9:31 am
Contact:

wesnoth program execution result

Post by spir » October 20th, 2009, 4:59 pm

Hello,

I'd like to know what kind of information wesnoth returns as result of execution -- eg error codes. Also, is there any data about game outcome?
Pointer welcome.
Denis
life is strange

various stuff about BfW (rules, stats, alternatives) and WML (parser, semantic schema, evolution)

AI
Developer
Posts: 2394
Joined: January 31st, 2008, 8:38 pm

Re: wesnoth program execution result

Post by AI » October 20th, 2009, 5:55 pm

From what I gather from a quick look at the responsible functions, 2 is returned if the arguments are malformed and 0 in all other cases.

spir
Posts: 97
Joined: September 15th, 2009, 9:31 am
Contact:

Re: wesnoth program execution result

Post by spir » October 20th, 2009, 6:20 pm

Thank you.
Is there any feedback about game results (that would help me, if only victory/defeat). Maybe a log file (structured like WML ;-))?
Denis
life is strange

various stuff about BfW (rules, stats, alternatives) and WML (parser, semantic schema, evolution)

AI
Developer
Posts: 2394
Joined: January 31st, 2008, 8:38 pm

Re: wesnoth program execution result

Post by AI » October 20th, 2009, 6:56 pm

When started with --nogui, wesnoth should do that. Unfortunately, right now (on 1.7.6+svn) it causes an exception to be thrown and the game to exit. Your version might still work though.

spir
Posts: 97
Joined: September 15th, 2009, 9:31 am
Contact:

Re: wesnoth program execution result

Post by spir » October 20th, 2009, 8:02 pm

AI wrote:When started with --nogui, wesnoth should do that. Unfortunately, right now (on 1.7.6+svn) it causes an exception to be thrown and the game to exit. Your version might still work though.
Do you mean a log file? I tried on 1.6.5. Searched both the main and user dirs trees and couldn't find any -- unless they're not named log*.
The command line was:

Code: Select all

usr/bin/wesnoth -- no-delay -m --no-gui --exit-at-end --scenario=/home/spir/.wesnoth1.6/data/campaigns/1p_trial.cfg
Also, I tried to run wesnoth using --log-info=general, just to see, but this brought nothing more (couldn't find any logfile). Frustrating...
Denis
life is strange

various stuff about BfW (rules, stats, alternatives) and WML (parser, semantic schema, evolution)

AI
Developer
Posts: 2394
Joined: January 31st, 2008, 8:38 pm

Re: wesnoth program execution result

Post by AI » October 20th, 2009, 8:13 pm

Try

Code: Select all

/usr/bin/wesnoth --nogui --multiplayer --scenario=TRIAL_SCENARIO_ID_NOT_FILENAME --controller1=ai
info will be printed to stdout and stderr.

If it's supposed to be played by a human though, that won't help.

spir
Posts: 97
Joined: September 15th, 2009, 9:31 am
Contact:

Re: wesnoth program execution result

Post by spir » October 21st, 2009, 6:08 pm

Thank you again,

I'll try it as soon as I can. By the way, if you any hint on this...
Denis
life is strange

various stuff about BfW (rules, stats, alternatives) and WML (parser, semantic schema, evolution)

Post Reply