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

Reset Map State
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Meatballsub
Divine Bovine




Joined: 16 Jun 2003
Posts: 437
Location: Northwest Georgia

PostPosted: Fri Sep 07, 2007 9:24 am    Post subject: Reply with quote

Doh, sorry. The script DOES work the first time.

I just confirmed that it just stays at 0:00 and you cannot trigger the script again.
_________________
MOCBJ Software - My Games
The Hamster Wheel - OHRRPGCE Information Database
Back to top
View user's profile Send private message Visit poster's website
msw188




Joined: 02 Jul 2003
Posts: 1041

PostPosted: Fri Sep 07, 2007 9:56 am    Post subject: Reply with quote

Sounds like read timer is goofing up somehow. Try inserting

show value (read timer(0))

right before the if check. This will let us see exactly what number we're getting here.

PS: This is generally a good idea. When stuff isn't going right, try running your variables/numbers through a show value command. It is probably your best friend ever in terms of finding/fixing scripting bugs.
_________________
My first completed OHR game, Tales of the New World:
http://castleparadox.com/gamelist-display.php?game=161

This website link is for my funk/rock band, Euphonic Brew:
www.euphonicbrew.com
Back to top
View user's profile Send private message Visit poster's website
Meatballsub
Divine Bovine




Joined: 16 Jun 2003
Posts: 437
Location: Northwest Georgia

PostPosted: Fri Sep 07, 2007 10:13 am    Post subject: Reply with quote

When I insert that it just shows "0" in the bottom left hand corner.
_________________
MOCBJ Software - My Games
The Hamster Wheel - OHRRPGCE Information Database
Back to top
View user's profile Send private message 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: Fri Sep 07, 2007 10:14 am    Post subject: Reply with quote

Hey, wasn't there a command to write to the debug file? There should be. It would make debugging much easier.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Bob the Hamster
OHRRPGCE Developer




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

PostPosted: Fri Sep 07, 2007 12:03 pm    Post subject: Reply with quote

'plot:trace'
Back to top
View user's profile Send private message Send e-mail Visit poster's website
msw188




Joined: 02 Jul 2003
Posts: 1041

PostPosted: Fri Sep 07, 2007 12:06 pm    Post subject: Reply with quote

Wow this is really weird. Sounds like a bug, really. Can anybody confirm that if checks work correctly when the condition is 0==0? Because that's what we have right now, and apparently the code is not getting run... I'm going to try it on RC3 (that's what I have handy right now)

Okay just did it, and 0==0 checks out as true in RC3. MBSub, try putting showvalue(123) inside the if block (right before the variable declarations) and let us know if 123 ever shows up in the bottom corner. Do not get rid of the other show value command. We need both to really see which parts of the script are being run.
_________________
My first completed OHR game, Tales of the New World:
http://castleparadox.com/gamelist-display.php?game=161

This website link is for my funk/rock band, Euphonic Brew:
www.euphonicbrew.com
Back to top
View user's profile Send private message Visit poster's website
Bob the Hamster
OHRRPGCE Developer




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

PostPosted: Fri Sep 07, 2007 12:35 pm    Post subject: Reply with quote

Oh! Hey! I just remembered something cool! TeeEmCee re-wrote the "script debugging mode" for Ubersetzung. If you have debugging keys enabled, press F10 twice, and your script will pause. Then you can press any key to step through it one-frame-at-a-time, while displaying some information about the currently-running commands.

Try it, and see if it is helpful
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Meatballsub
Divine Bovine




Joined: 16 Jun 2003
Posts: 437
Location: Northwest Georgia

PostPosted: Fri Sep 07, 2007 1:20 pm    Post subject: Reply with quote

Code:
script,minetimer,begin
if (read timer (0) == (0)) then (
show value (123)
variable (i,tag)
for (i,0,35) do,begin
tag:=read npc(i,11) + 1000
show value (read timer(0))
if (tag >> 1000) then, begin
set tag (tag,off)
end
end
set timer (0,60,timer:default,@resetstring,1,timer flag:battle)
$2="Ores reset in "
show string at (2,150,190)
show string at (1,280,190)
)
end

script,resetstring,begin
clear string (2)
clear string (1)
end


Maybe I did something in the code wrong, but it won't even show the "123" value as it just stays "0".
_________________
MOCBJ Software - My Games
The Hamster Wheel - OHRRPGCE Information Database


Last edited by Meatballsub on Sat Sep 08, 2007 6:39 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Meatballsub
Divine Bovine




Joined: 16 Jun 2003
Posts: 437
Location: Northwest Georgia

PostPosted: Fri Sep 07, 2007 1:21 pm    Post subject: Reply with quote

James Paige wrote:
Oh! Hey! I just remembered something cool! TeeEmCee re-wrote the "script debugging mode" for Ubersetzung. If you have debugging keys enabled, press F10 twice, and your script will pause. Then you can press any key to step through it one-frame-at-a-time, while displaying some information about the currently-running commands.

Try it, and see if it is helpful


Thanks, I will give it a shot Happy
_________________
MOCBJ Software - My Games
The Hamster Wheel - OHRRPGCE Information Database
Back to top
View user's profile Send private message Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Fri Sep 07, 2007 6:07 pm    Post subject: Reply with quote

Oh, wait a moment. Timers count down to -1. The idea was that they show 0 for a second before actually triggering whatever when they hit -1. So just change the first if to "if (read timer (0) <= 0)"

(msw meant for you to put the "show value (read timer(0))" before the very first if, so that it's shown every time the script runs)

Meatballsub wrote:
James Paige wrote:
Oh! Hey! I just remembered something cool! TeeEmCee re-wrote the "script debugging mode" for Ubersetzung. If you have debugging keys enabled, press F10 twice, and your script will pause. Then you can press any key to step through it one-frame-at-a-time, while displaying some information about the currently-running commands.

Try it, and see if it is helpful


Thanks, I will give it a shot Happy


Unfortunately, it's pretty unfinished. And undocumented! Actually, I'm going to fix that now. Anyway, this probably isn't a situation suited to using the debugger. But this give me an idea: I'll add a mode to the debugger for looking at the state of timers.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
msw188




Joined: 02 Jul 2003
Posts: 1041

PostPosted: Fri Sep 07, 2007 6:52 pm    Post subject: Reply with quote

Are you kidding me? How did I miss that misplacement when he posted the new script? I guess because he had already told me that it was returning zero, and I didn't even think about it being incorrectly placed. Well, the important thing is that the problem should now be solved. And we may have gotten improvements to the debugger out of it all.
_________________
My first completed OHR game, Tales of the New World:
http://castleparadox.com/gamelist-display.php?game=161

This website link is for my funk/rock band, Euphonic Brew:
www.euphonicbrew.com
Back to top
View user's profile Send private message Visit poster's website
Meatballsub
Divine Bovine




Joined: 16 Jun 2003
Posts: 437
Location: Northwest Georgia

PostPosted: Sat Sep 08, 2007 6:43 am    Post subject: Reply with quote

Okay, perfect. It now works more than once. Seriously, thanks for all of the tips that everyone suggested Happy
_________________
MOCBJ Software - My Games
The Hamster Wheel - OHRRPGCE Information Database
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You can post new topics in this forum
You can 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