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

What are the differences between...
Goto page Previous  1, 2, 3, 4, 5
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
msw188




Joined: 02 Jul 2003
Posts: 1041

PostPosted: Fri Jan 18, 2008 10:24 am    Post subject: Reply with quote

Okay, let's try getting a few things straightened out here.

1. If you want blank spaces to appear like the old Inn format, you should always use "hero by slot" EVERYWHERE in the script, and NEVER use "hero by rank".

2. The command "get hero name" stores names in strings, so in a text box, anywhere you want a name, it should use ${S#}

3. The command "get hero stat" stores stats in variables. If you want the stats to appear in a text box, the variables need to be global variables, and they should use ${V#}.

I'm sorry if all of this was already clear to you, Bis, but from your last few messages it did not appear so. I hope that this helps; from what you're saying, my first guess would be that you are sometimes using "hero by rank" to help in storing some information, when you should always be using "hero by slot".
_________________
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
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Sun Jan 20, 2008 11:08 pm    Post subject: Reply with quote

Quote:

I'm sorry if all of this was already clear to you, Bis, but from your last few messages it did not appear so...


It is very clear in my mind. When I use global variable to store figures in variable l need to key in ${V#} so that the figure can appear. When I use strings to store hero's names (like above) I l need to key in ${S#} so that the name of heroes can appear.

My problem is the following : when I test my script, I can see ${V56} instead of a stat. It's as if the figure hadn't been stored in the variable. Has somoene already seen something like that ?
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Mon Jan 21, 2008 12:56 am    Post subject: Reply with quote

OK, are you sure it is "${V56}" and not "$(V56}" or "${V56)" or "$V{56}" something like that? What is the contents of that line of the textbox? If you have other malformed tags on the same line I think it's possible that this would happen.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Tue Jan 22, 2008 11:30 am    Post subject: Reply with quote

I've made some more tests and when I test the wrong value appear in a test box in a very particular case. Here is the code:

Code:

# script test fake inn
script, fake inn , begin

suspend player

set variable (MyMoney, party money) #store the amount we currently have
get money (MyMoney) #prevents Hspeak from saying the variable is unused
lose money (MyMoney)

show text box (368)
wait for text box

nb hero:= 0 #reset heroes' counting

# store main hero stats
set variable (hero0 stat, get hero stat (0,stat:hp,current stat))
set variable (hero0 stat max, get hero stat(0,stat:hp,maximum stat))
set hero stat (0, stat:hp, 6, current stat) #prevents hspeak.exe from complaining
set hero stat (0, stat:hp, 6, maximum stat)
set hero stat (0, stat:hp, hero0 stat, current stat)
set hero stat (0, stat:hp, hero0 stat max, maximum stat)
get hero name (0,find hero(hero by slot(0)))
increment (nb hero, 1) #store main hero's datas
wait (2)

if (hero by slot (1) <> -1) then, begin #if slot (1) is occupied then, store his stats and names
set variable (hero1 stat, get hero stat (1,stat:hp,current stat))
set variable (hero1 stat max, get hero stat(1,stat:hp,maximum stat))
set hero stat (1, stat:hp, 6, current stat) #prevents hspeak.exe from complaining
set hero stat (1, stat:hp, 6, maximum stat)
set hero stat (1, stat:hp, hero1 stat, current stat)
set hero stat (1, stat:hp, hero1 stat max, maximum stat)
get hero name (1,find hero(hero by slot(1)))
increment (nb hero, 1)
wait (2)
end, else, begin
wait (1)
end

if (hero by slot (2) <> -1) then, begin #if slot (2) is occupied store his stats
set variable (hero2 stat, get hero stat (2,stat:hp,current stat))
set variable (hero2 stat max, get hero stat(2,stat:hp,maximum stat))
set hero stat (2, stat:hp, 6, current stat) #prevents hspeak.exe from complaining
set hero stat (2, stat:hp, 6, maximum stat)
set hero stat (2, stat:hp, hero2 stat, current stat)
set hero stat (2, stat:hp, hero2 stat max, maximum stat)
get hero name (2,find hero(hero by slot(2)))
increment (nb hero, 1)
wait (2)
end, else, begin
wait (1)
end

if (hero by slot (3) <> -1) then, begin #if slot (3) is occupied store his stats
set variable (hero3 stat, get hero stat(3,stat:hp,current stat))
set variable (hero3 stat max, get hero stat(3,stat:hp,maximum stat))
set hero stat (3, stat:hp, 6, current stat) #prevents hspeak.exe from complaining
set hero stat (3, stat:hp, 6, maximum stat)
set hero stat (3, stat:hp, hero3 stat, current stat)
set hero stat (3, stat:hp, hero3 stat max, maximum stat)
get hero name (3,find hero(hero by slot(3)))
increment (nb hero, 1)
wait (2)
end, else, begin
wait (1)
end

set tag (tag: inn case 1, off) #reset situation checking
set tag (tag: inn case 2, off)
set tag (tag: inn case 3, off)
set tag (tag: inn case 4, off)
set tag (tag: inn case 5, off)
set tag (tag: inn case 6, off)
set tag (tag: inn case 7, off)
set tag (tag: enough cash, off)
set tag (tag: stats stored, on)
wait (2)

if (check tag (tag: stats stored) == ON) then, begin
if (nb hero == 1)then, begin #1 hero= hero (0) is alone
show text box (381)
wait for text box
set tag (tag:inn case 8, on)
resume player
fake inn 2
end # end for if (nb hero == 1)then...

if (nb hero == 2)then, begin # 2 heroes (0) is with one another hero

if (hero by slot (1) <> -1) then, begin #  if slot (1) is occupied, then hero (0) is alone with hero (1)...
show text box (378)
wait for text box
set tag (tag:inn case 1, on)
resume player
fake inn 2
end

if (hero by slot (2) <> -1) then, begin #  if slot (2) is occupied, then hero (0) is alone with hero (2)...
show text box (383)
wait for text box
set tag (tag:inn case 2, on)
resume player
fake inn 2
end

if (hero by slot (3) <> -1)then, begin  # if slot (3) is occupied, then hero (0) is alone with hero (3)...
show text box (385) #PB HERE PB HERE
wait for text box
set tag (tag:inn case 3, on)
resume player
fake inn 2
end

end # end for if (nb hero == 2)then, begin...


if (nb hero == 3)then, begin #case 3 hero (0) is with 2 another heroes

if (hero by slot (1) == -1) then, begin # slot (1) is free then the 2 other heroes are in slot (2) and (3)...
show text box (382)
wait for text box
set tag (tag:inn case 4, on)
resume player
fake inn 2
end

if (hero by slot (2) == -1) then, begin # slot (2) is free the 2 other heroes are in slot (1) and (3)...
show text box (384)
wait for text box
set tag (tag:inn case 5, on)
resume player
fake inn 2
end

if (hero by slot (3) == -1) then, begin # slot (3) is free the 2 other heroes are in slot (1) and (2)...
show text box (379)
wait for text box
set tag (tag:inn case 6, on)
resume player
fake inn 2
end #end for the else begin

end # end for if (nb hero == 3)

if (nb hero == 4)then, begin # all the slots are full
show text box (380)
wait for text box
set tag (tag:inn case 7, on)
resume player
fake inn 2
end # end for if (nb hero == 4)

end #end for the check tag
end# end of plotscript
#---------------------------------------------------------------------------



Before this kind of error was happen rather frequently. Now, it only happens when hero0 is in slot 1 and hero3 is in slot 3 (the last one)

Good luck everybody.
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Tue Jan 22, 2008 7:04 pm    Post subject: Reply with quote

Your script doesn't tell me anything. According to the textbox code, it makes no difference what you store in any global variable, you shouldn't see "${V56}" in a textbox (unless perhaps there are other malformed tags).

What are the contents of textbox 385?
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Wed Jan 23, 2008 7:17 am    Post subject: Now the problem is that... Reply with quote

Text box 385 contains

Code:

${S0} ${V38}/${V39} # stats and name for hero is slot 0 (main slot)


${S3} ${V43}/${V44} # stats and name for hero in slot 3
The inn costs $500. You have ${V36}. #the cash you currently have



Choice is enabled. You have Pay/ Cancel. To make things clearer, I've added comments.

The problem is not anylonger that ${V44} appear in the text box while playing but that the stat is wrong!

For example, you'll see that hero 3 has 14/28 instead of 28/28. All this is really strange isn't it?
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Fri Jan 25, 2008 6:41 am    Post subject: Reply with quote

I can't see a reason for that problem: check that the global variable numbers used in the textbox match the global variable declarations in your script. You seem to have changed the global variable ids several times.


find hero is the inverse of hero by slot, so "find hero(hero by slot(3))" is equal to just 3. You have several lines like
get hero name (3,find hero(hero by slot(3)))
though this should not cause a problem.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Mon Jan 28, 2008 9:48 pm    Post subject: You're right Reply with quote

The Mad Cacti wrote:

find hero is the inverse of hero by slot, so "find hero(hero by slot(3))" is equal to just 3. You have several lines like
get hero name (3,find hero(hero by slot(3)))
though this should not cause a problem.


You're right "get hero name (3,find hero(hero by slot(3)))" does not cause any problems and my script compiles perfectly. The trouble comes when testing. As I've said before, I think that the problem is due to the fact that when the code runs, It does not have enough time to store the stats.

As the code goes on before storing is finished that may explain why the figure I see on the text is inferior and why before I add a tag I could see ${V44} while testing.

Before the tag the problem was even worse and no stat a all were stored.
So would somoene have suggestions to solve this problem?
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
msw188




Joined: 02 Jul 2003
Posts: 1041

PostPosted: Tue Jan 29, 2008 10:57 am    Post subject: Reply with quote

This sounds like a bug in the OHR to me. Even if the stats weren't stored correctly, the text box ought to show zero, or whatever the stat was last time it was stored correctly, but it should never show the actual letter combination "${V44}". And if it works correctly sometimes, then that means that the variable is being declared. Something very odd is going on here.
_________________
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
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Sat Feb 02, 2008 12:14 am    Post subject: No more problems! Reply with quote

I've download the lastest version of Custom.exe : voxhumana and I don't have problems anylonger Razz Razz

The bug may have been corrected meanwhile!

The new version seems pretty cool! Now we can create our own menu!
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
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, 4, 5
Page 5 of 5

 
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