News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Devlin

The Sword of Truth - improper argument in 1270

Started by Devlin, 21:01, 07 July 23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Devlin

I've been playing this RPG called Sword of Truth with limited success, due to after a short while of playing, it fails with an "Improper Argument in 1270"

The offending line:
1270 WINDOW SWAP 0,2:LOCATE 10,8:PRINT FNBAR$(SRC):LOCATE 10,9:PRINT FNBAR$(DIV):LOCATE 10,10:PRINT FNBAR$(WND):LOCATE 10,11:PRINT FNBAR$(0.7*WGT/(MEN-(MEN=0))):LOCATE 10,12:PRINT FNBAR$(FTG):WINDOW SWAP 0,2:RETURN
the source file it appears in is attached - I don't know *why* it's failing the way it is, just that I know it's always failing there.

Also there's a spelling mistake on line 1055 (I should really modify my copy of the disk image and correct that)
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

Rabs

Quote from: Devlin on 21:01, 07 July 23I've been playing this RPG called Sword of Truth with limited success, due to after a short while of playing, it fails with an "Improper Argument in 1270"

The offending line:
1270 WINDOW SWAP 0,2:LOCATE 10,8:PRINT FNBAR$(SRC):LOCATE 10,9:PRINT FNBAR$(DIV):LOCATE 10,10:PRINT FNBAR$(WND):LOCATE 10,11:PRINT FNBAR$(0.7*WGT/(MEN-(MEN=0))):LOCATE 10,12:PRINT FNBAR$(FTG):WINDOW SWAP 0,2:RETURN
the source file it appears in is attached - I don't know *why* it's failing the way it is, just that I know it's always failing there.

Also there's a spelling mistake on line 1055 (I should really modify my copy of the disk image and correct that)
How long does it take to fail.

Running game now and seems ok.

You cannot view this attachment.

The text file you attached looks corrupt at the end.

You cannot view this attachment.

Devlin

#2
that corruption at the end isn't part of the code (line 2033 is the last one), seems like an artefact of the amstrad's "save as ascii" feature.

my sequence of playing goes like this:

load"sword
start game with custom army
wander around a bit near the starting town after buying 20 warriors and some long swords
eventually it crops up. It happens on real hardware too, so I have no idea.
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

Rabs

How are you running it?

Run "Sword.bas"?

Devlin

Quote from: Rabs on 10:45, 08 July 23How are you running it?

Run "Sword.bas"?
Sword.bas, yes.

Think that does character definitions, then loads the sword2 bas which in turn loads a binary blob
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

Jean-Marie

Try replacing line 1270 with this :
1270 WINDOW SWAP 0,2:LOCATE 10,8:PRINT FNBAR$(SRC)
1271 LOCATE 10,9:PRINT FNBAR$(DIV)
1272 LOCATE 10,10:PRINT FNBAR$(WND)
1273 LOCATE 10,11:PRINT FNBAR$(0.7*WGT/(MEN-(MEN=0)))
1274 LOCATE 10,12:PRINT FNBAR$(FTG)
1275 WINDOW SWAP 0,2:RETURN

You'll still have a bug, but now it well tell you where is located the faulty instruction.

Rabs

Quote from: Devlin on 12:56, 08 July 23
Quote from: Rabs on 10:45, 08 July 23How are you running it?

Run "Sword.bas"?
Sword.bas, yes.

Think that does character definitions, then loads the sword2 bas which in turn loads a binary blob
Still cannot get it to fail but keep getting defeated by the Water Demons  :)

Devlin

Quote from: Rabs on 13:27, 08 July 23
Quote from: Devlin on 12:56, 08 July 23
Quote from: Rabs on 10:45, 08 July 23How are you running it?

Run "Sword.bas"?
Sword.bas, yes.

Think that does character definitions, then loads the sword2 bas which in turn loads a binary blob
Still cannot get it to fail but keep getting defeated by the Water Demons  :)
Try going with 25 warriors, you're practically invulnerable 
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

SwordOfTruth

The disc image on CPC files sites is incomplete
The mode0 loading screen is missing
There are numerous spelling mistakes and bugs in the basic code
The machine code has memory leaks and will prevent disc operations from working after a while playing the game
You can still use snapshots to save the game if playing on emulators
If you do not have any armor you will never have any men killed in battle
You can still die if no food or water
It is possible to complete the game by attacking the castles, ruins, temples and then attacking the tomb

An easy completion would be to start the game with default army
Sell potions, swords and armor
Buy as many great swords as you can
Fight until you can hire 25 warriors and buy 25 great swords
Fight until you have 10000 gold
Buy the teleport sorcery spell
Teleport to the ruins, castles, temples
Attack the monsters guarding the structures
Teleport to the tomb
Attack the monsters guarding the structure
Game complete

The teleport coordinates can be found in the basic code from line 1615
Make Amstrad Great Again

Devlin

Quote from: SwordOfTruth on 13:20, 09 July 23The disc image on CPC files sites is incomplete
The mode0 loading screen is missing
There are numerous spelling mistakes and bugs in the basic code
The machine code has memory leaks and will prevent disc operations from working after a while playing the game
You can still use snapshots to save the game if playing on emulators
If you do not have any armor you will never have any men killed in battle
You can still die if no food or water
It is possible to complete the game by attacking the castles, ruins, temples and then attacking the tomb

An easy completion would be to start the game with default army
Sell potions, swords and armor
Buy as many great swords as you can
Fight until you can hire 25 warriors and buy 25 great swords
Fight until you have 10000 gold
Buy the teleport sorcery spell
Teleport to the ruins, castles, temples
Attack the monsters guarding the structures
Teleport to the tomb
Attack the monsters guarding the structure
Game complete

The teleport coordinates can be found in the basic code from line 1615

It sounds like you know a lot about this. Is there a complete image of this out there? Is there a bugfixed version, perhaps?
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

SwordOfTruth

QuoteIt sounds like you know a lot about this. Is there a complete image of this out there? Is there a bugfixed version, perhaps?
I know some things about the game
I do not know if a finished or bugfixed version is out there, maybe some one from Mordorsoft would know more
Changing the border to color 3 looks better in the game
The loading of the background graphics should have been in the basic loader program and not a 17k screen hence the delay after changing the mode0 inks and using for-next as a delay before chaining the main basic code
It is possible that the castles, ruins, temples will not give you all six keys to complete the game

Is there a person here who can fix the bugs in the game?
It is a interesting role playing game from 1986 and would benefit from some modernisation
Make Amstrad Great Again

Powered by SMFPacks Menu Editor Mod