What the heck is wrong with this code?
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
What the heck is wrong with this code?
Code: Select all
[ai]
recruitment_pattern=fighter, scout, archer, healer, mixed fighter
{ATTACK_DEPTH 6 6 6}
[/ai]
recruit=Goblin Spearman, Orcish Archer, Orcish Assassin, Orcish Grunt
- Bob_The_Mighty
- Posts: 870
- Joined: July 13th, 2006, 1:15 pm
I always thought you weren't meant to have spaces after the commas in lists of units, but i might be mistaken there.
My current projects:
MP pirate campaign: The Altaz Mariners
RPG sequel: Return to Trent
MP stealth campaign: Den of Thieves
MP pirate campaign: The Altaz Mariners
RPG sequel: Return to Trent
MP stealth campaign: Den of Thieves
The WML preprocessor strips the extra spaces IIRC.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
More Detail
Sorry for being unspecific. My campaign does use EASY, NORMAL and HARD. There are 4 players. 1 & 2 are AI, 3 is human (you), and 4 is AI. The code above is the AI instructions for the 4th player, and is much like the AI instructions for players 1 and 2. Player 1, 2, 3 move fine, but when it starts player 4's turn Wesnoth causes a runtime error. When I remove the aforementioned code, it runs without a hitch.
Re: What the heck is wrong with this code?
Did you try to remove that healer, or add a shaman to the recruit-list ?DDR wrote:It simply crashes wesnoth, without giving any reasons. Any ideas?Code: Select all
[ai] recruitment_pattern=fighter, scout, archer, healer, mixed fighter [/ai] recruit=Goblin Spearman, Orcish Archer, Orcish Assassin, Orcish Grunt
-HaJo
Ok, submitted the bug. It works now...
I spoke to soon.
Now, any ideas what causes this code to crash?I am posting more code this time, as something may be affecting something else. The scenario this is in consists of 3 other side statements, and a start tag with a bit of speech and some objectives. When I remove player 4, (this code) it works. When I have it in, it doesn't. The crash occurs after player 3 ends turn. Here is the error message I get. Something about a divide error?
View the screenshot at: http://www.exong.net/forum/files/error_167.png
I spoke to soon.
Now, any ideas what causes this code to crash?
Code: Select all
[side]
side=4
no_leader=no
{QUANTITY type (Goblin Knight) (Goblin Knight) (Goblin Knight)}
description=Harg
user_description= _ "Harg"
unrenamable=yes
[modifications]
{TRAIT_STRONG}
{TRAIT_RESILIENT}
[/modifications]
{GOLD 150 150 150}
{INCOME 5 5 5}
team_name=Northern Defenders
controller=ai
fog=no
shroud=no
canrecruit=1
[ai]
recruitment_pattern=fighter,scout,archer,mixed fighter
{ATTACK_DEPTH 6 6 6}
[/ai]
recruit=Goblin Spearman, Orcish Archer, Orcish Assassin, Orcish Grunt
[/side]
View the screenshot at: http://www.exong.net/forum/files/error_167.png
recruitment_pattern has 'scout' in it, but I don't see any (usage=scout) units in your recruit list.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
I tried removing the scout from the recruit list, but it had no effect.
Does this code mean anything? It is the runtime error description.
Code: Select all
WESNOTH caused a divide error in module WESNOTH.EXE at 01cf:00425771.
Registers:
EAX=00011170 CS=01cf EIP=00425771 EFLGS=00210202
EBX=00000000 SS=01d7 ESP=00b2deac EBP=074a08d8
ECX=00000011 DS=01d7 ESI=00000003 FS=508f
EDX=00000000 ES=01d7 EDI=00000003 GS=0000
Bytes at CS:EIP:
f7 fb 03 c8 89 4c 24 18 8b 44 24 30 81 c5 e8 00
Stack dump:
073d0390 073a03e0 0552e8bc 05d6484c 0108b9a2 00011170 00000011 03fabb60 00000032 00000000 00000032 05d648f8 074a09c0 073d0300 00000000 00000000