Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Bug!
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Arcade
View previous topic :: View next topic  
Author Message
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Tue Dec 06, 2005 6:17 pm    Post subject: Bug! Reply with quote

I'm not sure if this one has been found by anyone else, but apparently load game scripts don't work with save slot #2.

I've tested this pretty extensively (but only with one game). Save slots 1, 3, and 4 work with my load script outside VDMS, with VDMS, and in the windows port, but Save slot 2 never activates the load game script ever.

Haven't looked over the source yet (and I doubt I would find anything) so I'll just announce it here.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Tue Dec 06, 2005 10:11 pm    Post subject: Reply with quote

Make a test case. Perhaps it's a bug in the script.

Put something like this:

Code:
script, load test, begin
  $1="Loaded successfully"
  show string(1)
end

_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
PlayerOne




Joined: 07 Sep 2005
Posts: 143
Location: UK

PostPosted: Wed Dec 07, 2005 4:46 am    Post subject: Reply with quote

I can't reproduce this. I tried it with a quick test script, and slot 2 worked fine in DOS and Windows.
Back to top
View user's profile Send private message
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Wed Dec 07, 2005 11:13 am    Post subject: Reply with quote

Dang! It must be something in my script, but I'm not sure what could be doing this. I tried it out on another computer, same results.

Code:
script, loadgame, begin
suspendplayer

variable(running)

while(running <> 1)
do(

showbackdrop(0)
wait
teleporttomap(5,0,0)
playsong(19)
wait
showmap

variable(whereto)
whereto:=mainmenu

if(whereto==1)
    then(storymode)
    else(if(whereto==2)
        then(arenamode)
    else(if(whereto==3)
        then(setdifficulty)
    else(if(whereto==4)
        then(gameover,increment(running))
    )))

)

resumeplayer # Debugging purposes

end


P.S: I like elseif Sad...

Here's a dumb idea. Maybe 'running' is the name of some hspeak thing I don't know about?[/code]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Wed Dec 07, 2005 2:07 pm    Post subject: Reply with quote

Try it again with the same data in all 3 slots. That may be your problem.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
PlayerOne




Joined: 07 Sep 2005
Posts: 143
Location: UK

PostPosted: Wed Dec 07, 2005 2:17 pm    Post subject: Reply with quote

The only thing I can see in that script is that whereto has to be 1-4, there is no default action if it is, say, 0. Maybe a message before the resumeplayer would show if it was falling right through?

Are you using the same saved games on each machine? Or are you saving it and loading it each time?
Back to top
View user's profile Send private message
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Wed Dec 07, 2005 3:28 pm    Post subject: Reply with quote

Whereto can only end up being 1, 2, 3, or 4.

The load game script isn't called at ALL from save slot 2.

I've tried multiple saves, different .sav files, the same data in each file, etc. It just doesn't work with save slot 2. Bizarre.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Wed Dec 07, 2005 3:36 pm    Post subject: Reply with quote

Ok, NOW it's activating, but it skips straight past the loop for some reason.

All I can think of is running must be initializing to 1 in the second save slot. Any insight on why this might be happening?

Edit: I added running:=0 after declaring the variable and everything works properly now.

Anyway, I still think this should be looked into... as far as I know, variables are supposed to automatically initialize to 0 in hspeak. It MUST have something to do with the save slot. Maybe the slots are numbered 0,1,2,3 and the 1 somehow was getting passed into my script?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Wed Dec 07, 2005 4:04 pm    Post subject: Reply with quote

JSH357 wrote:
Ok, NOW it's activating, but it skips straight past the loop for some reason.

All I can think of is running must be initializing to 1 in the second save slot. Any insight on why this might be happening?

Edit: I added running:=0 after declaring the variable and everything works properly now.

Anyway, I still think this should be looked into... as far as I know, variables are supposed to automatically initialize to 0 in hspeak. It MUST have something to do with the save slot. Maybe the slots are numbered 0,1,2,3 and the 1 somehow was getting passed into my script?


Exactly. The first argument to a load game script is automatically filled with the number of the save slot (0-3)

There used to be a bug that caused argument values to overflow into local variables if you did not declare any arguments... but that was fixed in Rusalka. You are using the latest version right?

... at least, I *think* I fixed that bug...
Back to top
View user's profile Send private message Send e-mail Visit poster's website
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Wed Dec 07, 2005 5:51 pm    Post subject: Reply with quote

Ah! Yeah, I suspected it had something to do with that. As my evil programming professor always says, "It's not a bug, it's a feature!"

It's the latest version. I don't remember the codename Raspberry!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Wed Dec 07, 2005 10:59 pm    Post subject: Reply with quote

Hmm, odd. I remember it being fixed, and the related bug being closed.

As your professor also likely said, always initialize your variables!
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Thu Dec 08, 2005 4:32 am    Post subject: Reply with quote

Mike Caron wrote:
As your professor also likely said, always initialize your variables!


I refuse to resort to that! I enjoy my initialised variables.

Code:
SUB setScriptArg (arg, value)
 IF scrat(nowscript, scrargs) > arg THEN
  heap(scrat(nowscript, scrheap) + arg) = value
 END IF
END SUB


Uhhh... I'm sorry for not looking over the code when you added it (being a lazy developer), but scrargs is the number of variables, not number of arguments. That would have to be pulled out of SCRIPTS.TXT
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Raekuul
Delicious!




Joined: 31 Mar 2004
Posts: 641
Location: Nowhere

PostPosted: Thu Dec 08, 2005 10:00 am    Post subject: Reply with quote

Another Bug- If you have 3 dead and one live hero, and the live hero leaves the party, until you go into the menus, you are able to run from any enemy and escape anything that can be escaped from... I did this in Arfenhouse!!!For!!!! the other day.
_________________
A broken clock is still right twice a day.
Back to top
View user's profile Send private message Visit poster's website
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Fri Dec 09, 2005 1:04 am    Post subject: Reply with quote

Raekuul wrote:
Another Bug- If you have 3 dead and one live hero, and the live hero leaves the party, until you go into the menus, you are able to run from any enemy and escape anything that can be escaped from... I did this in Arfenhouse!!!For!!!! the other day.


Well, two things:

1. Being able to run from enemies you are able to run from is not a bug.
2. However, not instantly going game over when entering a battle with an all-dead party is.

I never really thought about what happens when you do stuff like that. I guess one is not supposed to have an all-dead party.

Perhaps, if the last live hero is swapped out, the others are revived with 1 HP? Or, maybe not, but a game over should happen, methinks, in the next battle.
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Fri Dec 09, 2005 4:36 am    Post subject: Reply with quote

Quite simply you shouldn't be allowed to swap all your live heroes out of your party.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Arcade All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group