Axe Software Forums
  Quest Developer Forum
  bug in qdk 1.02


Author Topic:   bug in qdk 1.02
sweetguy posted 10-05-2001 19:21 GMT     
hi i've been here for a while but i've been quite. =) sorry.

anyways i'm makeing a game where you have 4 pep. in your group. you can add them with a add #player# command. from there it runs a proc. to check if there is room then anohter proc. to check if the palyer is in the room. well it works but when i add the player his name is still in the room but when i try to add him again it says he is not in the room. but his name is still in the place where the pep should be. i can still look at him and talk to him. i use both the remove player and hide player commands. is it a bug or am i doing somthing wrong. thanks

BTW i'm make a huge rpg with 15 playable pep. and a few hidden i'll have a demo out (if time allows) in about 1 or 2 months. and i have been proging rpg games for a while so i expect that you guys will like it. the battles are very complex makeing it not to easy to win but not to hard ethier.

thanks
david

Alex posted 10-05-2001 20:28 GMT          
I can't tell what's going on here without looking at some code. Could you either paste the code into this forum or send it by email to [email protected] please? Thanks.
Computer Whizz posted 10-05-2001 22:43 GMT          
The problem isn't in the alias/real name bit is it!? You're not calling two different characters by the same real name are you!? If so, just change their aliases to make them 'appear' the same but they're actually referred to as different people by Quest!
I wouldn't do too much of this though, it'd be very confusing to the player, about whom (<<correct!) you are talking to... but I suppose it depends on how you are going to have your game!
I think it's this.... if not, Alex should solve your problem!

--CW

sweetguy posted 11-05-2001 07:25 GMT          
ok a have a room with david, rj, cliff, ana, and danny. made a start proc. that david, rj, cliff and ana join first. (4 pep limit in a group. i gave them var. to put them into the group or take them out and add someone new. i have it as:
setstring <group; #per1# #per2# #per3# #per4#>
here is the rest of my code:
'this is to add a player
command <add #player#> do <check if 4>

'this is the proc. for that

define procedure <check if 4>

if has <gnum; -4> then do <~Internal Procedure 5> else msg <no room>

end define

'of course i set gnum to 4 but that's when i set the 4 players added

define procedure <~Internal Procedure 5>

set <gnum;+1>
do <check in room>

end define

'to check if player is in room

define procedure <check in room>

if here <#player#> then do <~Internal Procedure 4> else msg <he is not here>

end define

define procedure <~Internal Procedure 4>

setstring <per4; #player#>
do <add player>

end define

'finnally to add the payer and all other players that you gona want

define procedure <add player>
setstring <group;#per1# #per2# #per3# #per4#>
hidechar <#per1#>
hidechar <#per2#>
hidechar <#per3#>
hidechar <#per4#>

end define

no it works good unless i try to add them one at a time but i gona work on that next but still the name of the player should leave the room once i add him. also in the hole game (so far) i only have 9 pep. 5 addable and the rest npc. i gona add another proc so that they can't add a npc. but one thing at a time so i don't have a huge game with a milloin bugs. =P

sweetguy posted 11-05-2001 07:26 GMT          
BTW i set gnum to 3 and removed a player before i tryed adding a new player. so that's not the prob.
sweetguy posted 11-05-2001 07:32 GMT          
one last thing.
belive me i have player rpg's for a long time and adding and removeing players will not be difficult at all. i'll set up a menu of all the playable players in the room of there stats. and i'll let the player know when he can add a person with a before turn proc. that tells the player that:
msg <#playerinroom# is here and waiting to be added to the group!!>

ethier that or have a certain room to change players (have you ever played FF3???) well thanks for reading all this. laters

Computer Whizz posted 11-05-2001 15:21 GMT          
AHHH! So when you add them to your group (at the beginning of the game) you have them leave the starting room and end up in a second room..... once this has been done, you go onto playing the game?
Shouldn't this be as easy as them saying:
'Choose #player#'
if: #pep# is =4
then:print 'you've chosen four already!'
else:
if: #player# is not in current room
then:print 'sorry, you've chosen him or he is not in the current room!'
else:moving #player# to the next room.
Take #player# out of play (I don't think you need to!)
set #pep# to #pep# +1 (or pep;#pep#+1 or pep;+1 you may want to put the pep before the ; in #'s, I'm not too sure!).
and that's it really! justdo it again to choose 4 people. Once it has got four people it shouldn't go over!, I'm not too sure I've done everything right there and I KNOW that the syntax is wrong, it's a mixture of basic, quest, C/C++, English and my own dialect :)
Well since this took me 15 minutes to type (I got A LOT wrong, over and over again!) I hope this helps!!

--CW

sweetguy posted 11-05-2001 19:14 GMT          
that's pretty much what i did it's just that i did it all in proc.s so that in the quest later on players can be easily remove and added with out haveing to do the code all over again.

now for the code. it is right. it works but the player name stays in the room but in mem. the player is gone. so in other words this is what's happing:

in room: david roille
command: add david
setsrting <per1;#player#> 'player = david
setstring <group; #per1# #per2# #per3# #per4#> ' so now david is per1 but in my code set as per 4 but i'ma put another proc to test if there is a player in per1 2 or 3.
then move him down to the next avialbe slot.

'now we lok in the room
in room: david roille
'ok so i try to add him again
command: add david

'now after that quest says

he is not here
-----------------
now that's why i think there is a bug in quest. cuse from mem he is in my group and out of the room. but on screen he is still there. i've have been prog.ing for like 2 years so i know what i'm doing. i think the bug maybe in the list box or combo box (which ever alex used, yes i know how to prog. in vb) when he listed the pep in the pep in the room somewhere he forgot take them off. i used a proc.

sweetguy posted 11-05-2001 19:22 GMT          
ok now this is weird cuse i used the same proc.:

'yes i know the stanx is wrong but it's not wrong in the code

proc <add player>
setstring <group; #per1# #per2# #per3# #per4#>

remove player <#per1#>
remove player <#per2#>
remove player <#per3#>
remove player <#per4#>

end define

now i used it in my staring proc.
i set everyone as per1 per2 ect.
and the proc worked. players in the room once added are now off the screen, and mem.
but the sec. time i use the proc. (in the same room) the player is added but still on the screen.

alex you might wana check on the remove and hide chara. when used in a proc., two times, in the same room. in other word maybe your code can't handle the same proc. with remove chara. twice in the same room i'ma do some more testing in a dif. room and see what happens.

sweetguy posted 11-05-2001 19:28 GMT          
huh. ok you know what i'ma just paste my hole code in here cuse it still weird to me but i still think there is a bug in qdk. BTW i'm useing the qdk menu and notepad to prog. this game. that is why there are Internal Procedureds. well here it is :


' C:\Program Files\Quest\the new game.asl created by QDK 1.02

'*** The following line is required by QDK - please do not remove
'QDK-NIP <7>


define game <the new game>
asl-version <217>
start <bar>
game author <david>
game version <1>
game copyright <only to be used by david>
game info <Created with QDK 1.02>
default fontname <>
default fontsize <0>
items <>
startitems <>
collectables <start? dn=1 []; gnum dp=0 []>
startscript do <~Internal Procedure 0>
afterturn do <show group>
command <group> do <show group>
command <add #player#> do <check if 4>
else msg <ELES>

end define

define synonyms
end define
define room <bar>
alias <hidden>
out <bar1>
define character <rotana>

end define
define character <rollie>

end define
define character <cliff>

end define
define character <drunk1>

end define
define character <drunk2>

end define
define character <drunk3>

end define
define character <drunk4>

end define
define character <ass>

end define

end define

define room <bar1>
alias <bar>
prefix <a >
look <the bar stinks like beer and there is nothing but drunks and bad asses around. the air is stale and warm. a fight seems to break out every other min. the workers and unsteady and always looking over there shoulders.>
out <bar>
script if has <start?;=1> then do <~Internal Procedure 2>
define character <Jin>
gender <he>

end define
indescription <you are in >

end define

define room <davids home>
look <the house is small and looks normal from the outside. but once you wall in the door you can tell david loves the skill he trains and lives by. broken boards and bricks pave the floors. sworad hang from the wall. the insence that is buring is sweet and ins relaxing.>
define character <david>

end define

end define

define procedure <~Internal Procedure 0>
msg <this is not the real start. this is a lil bit after the start i still need to get the start ready but i don't know how. i don't know if i should start with david or rotana. david sent a letter to roillie and cillf saying to met him at the bat at 10 pm on sat.rotana just happen to be at the bar looking for someone to travle with her on a 7 day jornuy she came from her house 2 days away and david from a week away.>
wait <press enter to go on>
clear <>
say <thinking about put them at the same time or promting to ask guy or girl and do it like that but i think that i'll go witht the first one instead. anyways, i'ma start this off with ana in the bar first then i'ma have the drunks come in then david =) to finish it off. after they go to cliffs "astate" then. rotana talks to david about richelle and why helping her. >
movechar <rotana;bar1>

end define

define procedure <start>
do <~Internal Procedure 1>

end define

define procedure <~Internal Procedure 1>
movechar <drunk1;bar1>
movechar <drunk2;bar1>
movechar <drunk3;bar1>
movechar <drunk4;bar1>
wait <press enter to contuinue>
msg <rotana looks around. she looking at all the dif. pep around and see thatmost of the pep. here are not willing to help a lady out with out wanting *ahem* in return.>
msg <she sees 4 drunks that just entered looking and pointing at her she trys to get away from them but finds her self counerd>
say <where you going girly????? you look lost let daddy help you out>
movechar <david;bar1>
wait <press enter to contuinue>
msg <as david enters the room he sees a girl souroundered by the drunks and gets close to hear what's going on>
msg <rotana says ' no i'm fine please let me be!'>
msg <drunk3 says ' no i think we gona help you ut so why don't you be a good girl and come with us'>
msg <rotana 'i said no! get away from me'>
msg <drunk2 laughs and says 'you act like you have a choice'>
wait <please press enter>
msg <daivd then burst in and says 'gentlmen, gentlmen gentlmen, and lady. how lucky you are that i have found you cuse for tonight only i will show you a migic trick so exciting, so good that you can't pass it up'>
msg <drunk1 'get the hell out of here, were busy'>
msg <david 'yes i heard and that's fine but i really want to show you this trick i want to show everyone it. after i show you it i will let you go on to what ever you were doing'>
msg <rotana looks at david if he were a mad man.>
wait <please press enter>
msg <david 'now you grab my wrist' then drunk one grabs his wrist and then david grabs his hand with his free hand twist his wrist and truns forceing the drunk to move with him and slams into a wall. the other drunks look in suprise then attack>
movechar <rollie;bar1>
movechar <cliff;bar1>
msg <as rollie and cliff enter the room they see david in his lil brawl. roille then trwos a smoke bomb to help david out. the room fills with smoke and all is dark. as the smoke clears two are already down then david cast quick>
wait <please press enter>
msg <david 'Quick!!!!!!!!!">
msg <david then in a burst of speed he jumps and dose a spining heal kick to the drunks face and lands in almost a hand stand. then still with quick working he swings his body arond to kick out his feet. the drunks pick up there freind and run out of the bar.>
hidechar <drunk1>
hidechar <drunk2>
hidechar <drunk3>
hidechar <drunk4>
clear <>
exec <look>
wait <please press enter>
msg <david, rotana, rollie and cliff join the group!>
setstring <per1;david>
setstring <per2;rotana>
setstring <per3;rollie>
setstring <per4;cliff>
do <add player>
msg <in the group now is #group#>
set <gnum; =4>

end define

define procedure <~Internal Procedure 2>
set <start?;0>
do <start>

end define

define procedure <show group>
msg <in the group is #group#>

end define

define procedure <add player>
do <~Internal Procedure 6>
end define

define procedure <check if 4>
if has <gnum; -4> then do <~Internal Procedure 5> else set <gnum;-1>

end define

define procedure <check in room>
if here <#player#> then do <~Internal Procedure 4> else msg <he is not here>

end define

define procedure <~Internal Procedure 4>
setstring <per4; #player#>
do <add player>

end define

define procedure <~Internal Procedure 5>
set <gnum;+1>
do <check in room>

end define

define procedure <~Internal Procedure 6>
hidechar <#per1#>
hidechar <#per2#>
hidechar <#per3#>
hidechar <#per4#>
setstring <group;#per1# #per2# #per3# #per4#>
end define

define procedure <remove player>

end define

define text <intro>

end define

define text <win>

end define

define text <lose>

end define

Luridii posted 12-05-2001 09:28 GMT          
Hi, ppl, haven't been here 4 a while, anyway sweetguy r u using wait as an actual command?

What u should b doing is like:

msg <text|nPress enter|w

the |w means wait before the next piece of text is displayed.

That help?

Luridii posted 12-05-2001 09:31 GMT          
Oops and remember the > after the |w or u could just put the text u want 2 continue with after it..
sweetguy posted 13-05-2001 04:50 GMT          
yeah i use it if i porg.ing in all text then i would do it that way but i switching back and fourth
Luridii posted 13-05-2001 10:17 GMT          
But r u using wait as a command as u wrote b4?

wait <please press enter>

Alex posted 13-05-2001 20:39 GMT          
I've tried your code in Quest 3.0 - I add "cliff" and Cliff stays in the room, but it says he is added to the group. This happens no matter how many times I add Cliff.

Looking at the Debug windows, as is always a good idea, there are a load of spaces added to the beginnings of your variables. Quest won't be able to hide a character called " cliff" (with a space at the beginning). This is because in Quest 2.x, strings are not trimmed of spaces.

Although in Quest 3.0, setstring <per4; #player#> will work fine, in Quest 2.x you need to use setstring <per4;#player#> without the space.

sweetguy posted 14-05-2001 18:50 GMT          
thanks alex,i'll try that and see what happens.

"But r u using wait as a command as u wrote b4?"

yes i am but it's just for now till i get all the codeing right once i have a good battle sytem and story line and player changeing system then i will prog it all in notepad the right way.