| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| JSH357 
 
 
  
 Joined: 02 Feb 2003
 Posts: 1705
 
 
 | 
			
				|  Posted: Tue Dec 06, 2005 6:17 pm    Post subject: Bug! |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| Mike Caron Technomancer
 
 
 
  
 Joined: 26 Jul 2003
 Posts: 889
 Location: Why do you keep asking?
 
 | 
			
				|  Posted: Tue Dec 06, 2005 10:11 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| PlayerOne 
 
 
  
 Joined: 07 Sep 2005
 Posts: 143
 Location: UK
 
 | 
			
				|  Posted: Wed Dec 07, 2005 4:46 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| JSH357 
 
 
  
 Joined: 02 Feb 2003
 Posts: 1705
 
 
 | 
			
				|  Posted: Wed Dec 07, 2005 11:13 am    Post subject: |   |  
				| 
 |  
				| 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
   
 Here's a dumb idea.  Maybe 'running' is the name of some hspeak thing I don't know about?[/code]
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Moogle1 Scourge of the Seas
 Halloween 2006 Creativity Winner
 
  
 
  
 Joined: 15 Jul 2004
 Posts: 3377
 Location: Seattle, WA
 
 | 
			
				|  Posted: Wed Dec 07, 2005 2:07 pm    Post subject: |   |  
				| 
 |  
				| Try it again with the same data in all 3 slots. That may be your problem. _________________
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| PlayerOne 
 
 
  
 Joined: 07 Sep 2005
 Posts: 143
 Location: UK
 
 | 
			
				|  Posted: Wed Dec 07, 2005 2:17 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| JSH357 
 
 
  
 Joined: 02 Feb 2003
 Posts: 1705
 
 
 | 
			
				|  Posted: Wed Dec 07, 2005 3:28 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| JSH357 
 
 
  
 Joined: 02 Feb 2003
 Posts: 1705
 
 
 | 
			
				|  Posted: Wed Dec 07, 2005 3:36 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| Bob the Hamster OHRRPGCE Developer
 
 
 
  
 Joined: 22 Feb 2003
 Posts: 2526
 Location: Hamster Republic (Southern California Enclave)
 
 | 
			
				|  Posted: Wed Dec 07, 2005 4:04 pm    Post subject: |   |  
				| 
 |  
				|  	  | 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 |  | 
	
		|  | 
	
		| JSH357 
 
 
  
 Joined: 02 Feb 2003
 Posts: 1705
 
 
 | 
			
				|  Posted: Wed Dec 07, 2005 5:51 pm    Post subject: |   |  
				| 
 |  
				| 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
  |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Mike Caron Technomancer
 
 
 
  
 Joined: 26 Jul 2003
 Posts: 889
 Location: Why do you keep asking?
 
 | 
			
				|  Posted: Wed Dec 07, 2005 10:59 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| TMC On the Verge of Insanity
 
 
 
 
 Joined: 05 Apr 2003
 Posts: 3240
 Location: Matakana
 
 | 
			
				|  Posted: Thu Dec 08, 2005 4:32 am    Post subject: |   |  
				| 
 |  
				|  	  | 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 |  | 
	
		|  | 
	
		| Raekuul Delicious!
 
 
 
  
 Joined: 31 Mar 2004
 Posts: 641
 Location: Nowhere
 
 | 
			
				|  Posted: Thu Dec 08, 2005 10:00 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| Mike Caron Technomancer
 
 
 
  
 Joined: 26 Jul 2003
 Posts: 889
 Location: Why do you keep asking?
 
 | 
			
				|  Posted: Fri Dec 09, 2005 1:04 am    Post subject: |   |  
				| 
 |  
				|  	  | 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 |  | 
	
		|  | 
	
		| TMC On the Verge of Insanity
 
 
 
 
 Joined: 05 Apr 2003
 Posts: 3240
 Location: Matakana
 
 | 
			
				|  Posted: Fri Dec 09, 2005 4:36 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		|  |