THE GREATEST GAME EVER.... DOESNT WORK!

Elexxorine
23 Feb 2005, 21:29
ive been programming all day and just tried to test the game (stupid i know) and found that it crashed on loading!

' "TBC"
' Created with QDK 3.52 - UNREGISTERED VERSION

!include <Typelib.qlb>

define game <TBC>
asl-version <350>
gametype singleplayer
start <Astnia, traven>
game author <elexxorine>
game version <1.00 pre-alpha>
game info <Created with QDK 3.52 - UNREGISTERED EVALUATION VERSION.>
command <stats> msg <GENERAL:|nYou are #race#, #class# .|nhit points: %hp% / %mhp% .|nstamina: %sta% / %msta% .|nyou have %gold% pieces of gold.|n|nSTATS:|nstrength: %str% .|ndexterity: %dex% .|nagility: %agl% .|nintelligence: %int%.|nyou are level %level% with %exp% experience points.|nyou are |i#align#|xi .|n|nOUTSIDE WORLD:|nit is |i%hrs%|xi hours and |i%mins%|xi minutes of the clock, on day |i%day%|xi .|nit is |i#weather#|xi outside.>
define variable <race>
type string
value <elf>
end define
define variable <class>
type string
value <peasant>
end define
define variable <gold>
type numeric
value <90>
end define
define variable <level>
type numeric
value <1>
end define
define variable <exp>
type numeric
value <0>
end define
define variable <str>
type numeric
value <1>
end define
define variable <dex>
type numeric
value <1>
end define
define variable <agl>
type numeric
value <1>
end define
define variable <int>
type numeric
value <1>
end define
define variable <align>
type string
end define
define variable <mins>
type numeric
value <0>
end define
define variable <hrs>
type numeric
value <4>
end define
define variable <day>
type numeric
value <1>
end define
define variable <weather>
type string
onchange msg <It is #weather# outside.>
end define
define variable <weather2>
type numeric
value <6>
end define
define variable <hp>
type numeric
value <100>
end define
define variable <mhp>
type numeric
value <50>
end define
define variable <sta>
type numeric
value <50>
end define
define variable <msta>
type numeric
value <50>
end define
define variable <align2>
type numeric
value <70>
end define
end define

define synonyms
end define

define room <Astnia, traven>
alias <Drunken Druid Inn>
prefix <The>
look <A typical pub. People are sitting at tables drinking ale and sweet beer while sharing tales and swapping legonds. A fire is crakling in the corner warming every corner of the room, smoke and the smells of liquer waft in the air and calm you, it feels like home...>
out <Astnia, west street>

define object <barkeep>
alt <barman; bar man; barkeeper; bar keeper; barkeep; bar keep>
look <The bar keeper is standing behind the counter, serving drinks.>
examine <He has short black hair, light brown eyes, greesy dark blue skin and a scowl. He is wearing an apron over his normal clothes and is quite short but tough looking.>
prefix <the>
displaytype <shop owner>
article <him>
gender <he>
type <TLTactor>
properties <not named>
action <speak> choose <shop_bar>
end define

define object <fireplace>
alt <fire; fire place>
look <the fire place is crakling in the corner.>
displaytype <scenery>
article <it>
gender <it>
type <TLTscenery>
end define

define object <people>
look <there are many people sitting, drinking, chatting.>
displaytype <people>
article <them>
gender <they>
end define

define object <stranger>
look <he is sitting a the very back of the room, with his hood up consealing his face.>
displaytype <persom>
article <him>
gender <he>
type <TLTactor>
properties <not named>
end define

end define

define room <store_room>

define object <ale>
look <its warm and frothy.>
speak <your not that depressed are you?>
displaytype <food>
article <it>
gender <it>
type <TLTobject>
properties <not takeable; noTake=you must buy this first.>
end define

define object <sweetbeer>
look <it's bubbling away in its bottle.>
displaytype <food>
article <it>
gender <it>
type <TLTobject>
properties <not takeable; noTake=you must buy this first.>
end define

define object <raggedtop>
alt <top>
look <it is a piece of scrawny cloth made into a top, it is the lowest form of clothing.>
displaytype <clothing (top)>
article <it>
gender <it>
type <TLTobject>
type <TLTvest>
properties <topcover=2; sex=0; worn>
end define

define object <raggedbottoms>
alt <bottoms>
look <it is a piece of scrawny cloth made into a top, it is the lowest form of clothing.>
displaytype <clothing (bottoms)>
article <it>
gender <it>
type <TLTobject>
type <TLTundies>
properties <botcover=2; sex=0; worn>
end define

define object <fur>
look <it is a piece of carefully cut animal fur.>
article <it>
gender <it>
type <TLTobject>
properties <noWear=that would just look silly....>
end define

end define

define room <Astnia, temple>
alias <Astnia Temple>
prefix <the>
look <a large room with high walls and a glass doom, filled with riches and decorations. in the middle is a raised platform on which is a eight-pointed star carved into the floor, with burning candles at the tip of each point, the lines glow faintly purple and the smell of leechgrass wofts through the air.>
out <Astnia, east street>

define object <star>
look <it was carved into the floor hundreds of years ago by the great godess Fanati.>
displaytype <magic>
article <it>
gender <it>
type <TLTscenery>
end define

define object <archpriest>
alt <headpriest; arch priest; head priest>
look <he is wearing tranditional robes, his head is bowed and he is mumbling something under his breath.>
displaytype <person>
article <him>
gender <he>
type <TLTactor>
properties <not named>
end define

end define

define room <Astnia, marketplace>
alias <marketplace>
prefix <the>
look <people are bussle#ing round the stalls, as tenders call out 'once in a life time' offers. rich smells of all kinds zoom up your nose and the noise is deafening.>
east <Astnia, east street>
west <Astnia, west street>

define object <furman>
alt <fur man; fur trader; furtrader>
look <he is standing next to his stall, which has various animals skins on display.>
examine <he has light golden brown hair and eyes, he skin is a deep purply colour.>
displaytype <shop owner>
article <him>
gender <he>
type <TLTactor>
properties <not named>
end define

define object <furstall>
alt <fur stall>
look <it is has various animal skins on display: fox, wolf, rabbit, wig-wig, any many more...>
displaytype <shop stall>
article <it>
gender <it>
type <TLTobject>
type <TLTscenery>
properties <not takeable; noTake=that implies stealing....>
end define

end define

define room <Astnia, west street>
alias <west street>
look <a long and twisty road leading from the central market place to the outer city gates.>
indescription <You are on:>
east <Astnia, marketplace>
place <Astnia, traven>
end define

define room <Astnia, east street>
look <a stort and well built road in the good part of town.>
indescription <You are on:>
west <Astnia, marketplace>
place <Astnia, temple>
end define

define procedure <hrschange>
if ( %mins% >= 60 ) then {
set <hrs; %hrs%+1>
set <mins; 0>
}
if ( hrs >= 24 ) then {
set <hrs; 0>
set <day; %day%+1>
}

end define

define procedure <alignment>
if ( align2 >= 1 ) and ( align2 <= 20 ) then set <align; PURE EVIL!!!> else {if ( align2 >= 21 ) and ( align2 <= 40 ) then set <align; evil> else {if ( align2 >= 41 ) and ( align2 <= 60 ) then set <align; neutral/evil> else {if ( align2 >= 61 ) and ( align2 <= 80 ) then set <align; neutral> else {if ( align2 >= 81 ) and ( align2 <= 100 ) then set <align; neutral/good> else {if ( align2 >= 101 ) and ( align2 <= 120 ) then set <align; good> else {if ( align2 >= 121 ) and ( align2 <= 140 ) then set <align; PURE GOOD!!!>}}}}}}

end define

define procedure <mhit>
set <mhp; %str%+%str%+4>

end define

define procedure <mstam>
inc <msta; %agl%+%agl%+4>

end define

define procedure <mhit2>
if ( hp > mhp ) then set <hp; %mhp%>

end define

define procedure <mstam2>
if ( sta > msta ) then set <sta; %sta%>

end define

define timer <minutes>
interval <1>
action set <mins; %mins%+1>
enabled
end define

define timer <weatherchanger>
interval <15>
action {
set <weather2; $rand(1;10)$>
if ( weather2 = 1 ) or ( weather2 = 2 ) or ( weather2 = 3 ) or ( weather2 = 4 ) or ( weather2 = 5 ) then set <weather; #weather#> else {if ( weather2 = 6 ) then set <weather; sunny> else {if ( weather2 = 7 ) then set <weather; raining> else {if ( weather2 = 8 ) then set <weather; windy> else {if ( weather2 = 9 ) then set <weather; snowing> else {if ( weather2 = 10 ) then set <weather; very hot>}}}}}
}
enabled
end define

define text <intro>

end define

define text <win>

end define

define text <lose>

end define

define selection <shop_bar>
info <What would you like to buy?>
choice <Buy_Ale> {
msg <this ale costs 6 gold pieces.>
wait <press any key....>
if ask <this ale costs 6 gold pieces. are you sure you wish to buy?> then {if ( gold >= 6 ) then {
set <gold; %gold%-6>
give <ale>
}
else msg <you do not have enough gold....>} else msg <you do not have enough gold to buy this....>} else msg <"ok then....">
}
choice <Buy_Sweetbeer> {
msg <this sweetbeer costs 9 gold pieces.>
wait <press any key....>
if ask <this sweetbeer costs 9 gold pieces. are you sure you wish to buy?> then {{if ( gold >= 9 ) then {
msg <you but the sweetbeer....>
give <sweetbeer>
set <gold; %gold%-9>
}
} else msg <you do not have enough gold....>} else msg <you do not have enough gold....>} else msg <you do not have enough gold to buy this....>} else msg <"ok then....">
}
choice <?_Ale> {
msg <ALE:|n this bitter drink is served in almost every pub, it is dark brown, frothy and very alcoholic.|n USUAL PRICE: 6 gold pieces.>
wait <press any key....>
choose <shop_bar>
}
choice <?_Sweetbeer> {
msg <SWEETBEER:|n this refreshing drink is served in almost every pub, it is a teacle colour and favoured by most for its relaxing effects.|n USUAL PRICE: 9 gold pieces.>
wait <press any key....>
choose <shop_bar>
}
choice <Buy_Nothing>
end define
define selection <talk_general1>
info <what would you like to ask about?>
choice <gossip> msg <"i hear that omething funny's happening down in the plains...">
choice <rumours> msg <"they say there's an evil traveling from the south. towards Kelonyon forest...">
choice <nothing>
end define
define selection <shop_fur1>
info <what would you like?>
choice <buy_fur> {
msg <this fur costs 3 gold pieces. are you sure you wish to buy?>
wait <press any key....>
if ask <this fur costs 3 gold pieces. are you sure you wish to buy?> then {if ( gold >= 3 ) then {
set <gold; %gold%-3>
give <fur>
}
else msg <you do not have enough gold....>} else msg <you do not have enough gold to buy this....>} else msg <"ok then....">
}
choice <?_fur> {
msg <FUR:|na piece of animal skin that has been carefully cut and shaped for whatever purposes it is needed for.|nUSUAL PRICE: 3 gold pieces.>
wait <press any key....>
choose <shop_fur1>
}
choice <buy_nothing> msg <"suit yourself....">
end define


bit long i know, but it said there we too many } s , ive been using QDK to do this.

please help..... :cry:

davidw
23 Feb 2005, 21:51
The easiest thing to do is copy it all into a Word document and use it to find all the { and } then you can work out what's missing.

Elexxorine
23 Feb 2005, 22:55
i think its this bit, there are 4 { and 6 } but im dont know what to change.

choice <Buy_Sweetbeer> {
msg <this sweetbeer costs 9 gold pieces.>
wait <press any key....>
if ask <this sweetbeer costs 9 gold pieces. are you sure you wish to buy?> then {{if ( gold >= 9 ) then {
msg <you but the sweetbeer....>
give <sweetbeer>
set <gold; %gold%-9>
}
} else msg <you do not have enough gold....>} else msg <you do not have enough gold....>} else msg <you do not have enough gold to buy this....>} else msg <"ok then....">
}

oh and this bit, it's pretty much the same thing:

choice <buy_fur> {
msg <this fur costs 3 gold pieces.>
wait <press any key....>
if ask <this fur costs 3 gold pieces. are you sure you wish to buy?> then {if ( gold >= 3 ) then {
set <gold; %gold%-3>
give <fur>
}
else msg <you do not have enough gold....>} else msg <you do not have enough gold to buy this....>} else msg <"ok then....">
}

i don't type in asl and don't know what to change, i'll probably just screw it up even more....

Elexxorine
23 Feb 2005, 23:21
i am so thick on reading my post as it has the {} in bold i noticed that i had something writen twice. and that made it make no sense! i killed that bit and it didn't complain and it worked how i wanted it, but it won't let you actually buy things because the stats STILL AREN'T WORKING!!!!!

what doesn't work:
1.the weather system doesn't work. or display. as well as alignment doing the same.
2.hp and stamina do not change with your stats and your hp etc can go over their max.
3.money doesn't work when buying stuff.

my first post in this thread had the whole code, can someone please please please read it and find why they don't work :cry: when i read the code i says that it should work yet it doesn't! i've worked really hard on this game, but it doesn't work............................if anyone can make it work it'll make me the happiest person alive :roll:

paul_one
24 Feb 2005, 00:33
First, I'm using typelib.asl - the file given out with Quest - so I don't know what bugs there might be with reguard to that.

The error in loading the game is indeed due to the choices (menu's) you have at the end.

You cannot have an IF, with 3 else's!!

define selection <shop_bar>
info <What would you like to buy?>
choice <Buy_Ale> {
msg <this ale costs 6 gold pieces.>
wait <press any key....>
if ask <this ale costs 6 gold pieces. are you sure you wish to buy?> then {
if ( gold >= 6 ) then {
set <gold; %gold%-6>
give <ale>
}
else msg <you do not have enough gold....>
}
}
choice <Buy_Sweetbeer> {
msg <this sweetbeer costs 9 gold pieces.>
wait <press any key....>
if ask <this sweetbeer costs 9 gold pieces. are you sure you wish to buy?> then {
if ( gold >= 9 ) then {
msg <you but the sweetbeer....>
give <sweetbeer>
set <gold; %gold%-9>
}
else msg <you do not have enough gold....>
}
}
choice <?_Ale> {
msg <ALE:|n this bitter drink is served in almost every pub, it is dark brown, frothy and very alcoholic.|n USUAL PRICE: 6 gold pieces.>
wait <press any key....>
choose <shop_bar>
}
choice <?_Sweetbeer> {
msg <SWEETBEER:|n this refreshing drink is served in almost every pub, it is a teacle colour and favoured by most for its relaxing effects.|n USUAL PRICE: 9 gold pieces.>
wait <press any key....>
choose <shop_bar>
}
choice <Buy_Nothing>
end define

define selection <talk_general1>
info <what would you like to ask about?>
choice <gossip> msg <"i hear that omething funny's happening down in the plains...">
choice <rumours> msg <"they say there's an evil traveling from the south. towards Kelonyon forest...">
choice <nothing>
end define

define selection <shop_fur1>
info <what would you like?>
choice <buy_fur> {
msg <this fur costs 3 gold pieces. are you sure you wish to buy?>
wait <press any key....>
if ask <this fur costs 3 gold pieces. are you sure you wish to buy?> then {
if ( gold >= 3 ) then {
set <gold; %gold%-3>
give <fur>
}
else msg <you do not have enough gold....>
}
else msg <it is a shame you choose not to buy this luxurious fur!>
}
choice <?_fur> {
msg <FUR:|na piece of animal skin that has been carefully cut and shaped for whatever purposes it is needed for.|nUSUAL PRICE: 3 gold pieces.>
wait <press any key....>
choose <shop_fur1>
}
choice <buy_nothing> msg <"suit yourself....">
end define

I have corrected, indented and that code allows you to load the game now.

There is no code to alter the HP - how do you know it can go over 100?
Easy way to fix this is:
	define variable <hp>
type numeric
value <100>
onchange if ( %hp% > %mhp% ) then set numeric <hp; %mhp%>
end define

That way , whenever the HP is changed, it is set to %mhp% - which I take it is Maximum HP - although it needs to be changed first.

The weather didn't change because the timer was wrong:
define timer <weatherchanger>
interval <15>
action {
set <weather2; $rand(1;10)$>
if ( %weather2% = 5 ) then set <weather; #weather#> else {
if ( %weather2% = 6 ) then set <weather; sunny> else {
if ( %weather2% = 7 ) then set <weather; raining> else {
if ( %weather2% = 8 ) then set <weather; windy> else {
if ( %weather2% = 9 ) then set <weather; snowing> else if ( %weather2% = 10 ) then set <weather; very hot>
}
}
}
}
}
enabled
end define
is correct..

These two procedure's were wrong:
define procedure <mhit2>
if ( %hp% > %mhp% ) then set <hp; %mhp%>

end define

define procedure <mstam2>
if ( %sta% > %msta% ) then set <sta; %sta%>

end define


I can't get to the shop display - how do you get to activate the shop in the game?

[EDIT] The updated file is here:
http://www.compwhizz.freeserve.co.uk/asldemos/ELX/
You can download that file instead of trying to edit the file you have - it shouldn't in any way cause an error in QDK.

Elexxorine
24 Feb 2005, 10:13
when loading your version it fails and claims that there is no typelib. but i have typelib in my quest folder like your meant to.... but on looking closely i saw that i had version 1.09 for quest 3.11, where can i get the lastest version? he never logs in and uses guest and claims to look at the member list for his email address, which has been removed....

EDIT: read yours in wordpad, you made it want the asl file, not the lib so i did that and checked your version, and the weather system works but nothing else does.....
GENERAL:
You are elf, peasant . <--you are #race#, #class#.
hit points: 100 / 50 . <--hit points: %hp% / %mhp%.
stamina: 50 / 50 . <--stamina: %sta% / %msta%.
you have 90 pieces of gold. <--you have %gold% pieces of gold.

STATS:
strength: 1 . <-- strength: %str%.
dexterity: 1 . <--dexterity: %dex%.
agility: 1 . <--agility: %alg%.
intelligence: 1. <--intelligence: %int%.
you are level 1 with 0 experience points. <--you are level %level% with %exp%....
you are . <-- you are #align#.

OUTSIDE WORLD:
it is 4 hours and 166 minutes of the clock, on day 1 . <-- it is %hrs% and %mins% of the clock on day %day%.
it is windy outside.

it what it says, time goes over 60 mins and doesn't add to the hours, alignment still doesn't show but that might be because it hasn't changed. the weather didn't work until 30 secomds had passed as it was set to say nothing then chose that once again but then changed and worked fine. the stats didn't change at all. they are meant to be so that the maxhp is 2times str plus 4 (=6) and the hp should not go over its max.

sorry if im going on a bit but i really want this to work.

Elexxorine
24 Feb 2005, 10:59
ok been fiddling alot and got the shops to work prefectly :D :D :D
weather's fine, alignment still off as well as stats and time. but i'm (with some help - thanx CW) slowly getting it working....

GameBoy
24 Feb 2005, 11:21
how could you have been programming all day if you didn't do one bit of programming? Firstly, because it's scripting, secondly, because you used QDK :P

Anyways, the best thing to do is to always test bits after you've done them instead of doing an entire game THEN testing it :) Even with the slot machine, i scripted little bits and tested them before adding more.

paul_one
24 Feb 2005, 21:28
The minute's don't change because you don't call the procedure... Simply move everything to the "onchange" in the status variables.

Weather takes however long you put in there (16 seconds)...
Yeah, I got mine to work with that file - and I don't see how it DOESN'T work since your quest directory has that file in there - so it should be 100% fine unless you've deleted it/folled about with a default install (which I have - basically).

I do all my editing in Notepad, alot nicer IMO.

The stats will change when you call that procedure - not magically.

Elexxorine
25 Feb 2005, 11:06
i did what you set and i changed the start room to an room where it describes the game to you, and changes all the variable enteries so they configue right but all i get is runtime error 28, out of stack space. i think this is because quest is very bad at runnig lots of variables, like what in CW's rpg lib, so i don't know if it worked or not.

NOTE: its a seperate room cos' i tried to put it in the start script but a got the RT error28 and tried making it a room.....

any sugestions?

Elexxorine
25 Feb 2005, 12:11
it hasn't been long from my last post but i fixed the start up, hp going over its max, the maxiums, the clock (no more 5:60, lol), weather updates, stats (almost), money works!!!!! :D :D :D
some things still don't work:
1.alignment, but i'm working on it.
2.simple time:
it changes with the hour:
define variable <hrs>
type numeric
value <5>
onchange {
if ( %hrs% = 2 ) then set <#time#; early morning> else {
if ( %hrs% = 5 ) then set <#time#; dawn> else {
if ( %hrs% = 8 ) then set <#time#; morning> else {
if ( %hrs% = 11 ) then set <#time#; mid-day> else {
if ( %hrs% = 14 ) then set <#time#; afternoon> else {
if ( %hrs% = 17 ) then set <#time#; dusk> else {
if ( %hrs% = 20 ) then set <#time#; evening> else {
if ( %hrs% = 23 ) then set <#time#; midnight> else {
if ( %hrs% = 24 ) then {
set numeric <hrs; 0> set numeric <day; %day%+1>
set numeric <day; %day%+1>
}
}}}}}}}}}
end define

this code also changes the days..... but doesn't work, why?

MaDbRiT
25 Feb 2005, 13:02

but on looking closely i saw that i had version 1.09 for quest 3.11, where can i get the lastest version?



Just email me so I know where to send it to...

he never logs in and uses guest and claims to look at the member list for his email address, which has been removed....



'he' doesn't log in when he accesses these forums from home because of issues with his I.S.P. - (basically logging in just doesn't work!) :o

Never? I think there are over 40 posts on here I've made from my place of work which - as it uses a different I.S.P. allows me to log in just fine.

As for the disappearance of the member list - surely you can't blame me for that! :lol:

Elexxorine
27 Feb 2005, 00:44
ok i added a choice of races:
*truzhe (dark-elves).
*ytomim (high/wood elves).
*pnoflo (cat people).
*flasodri (humans).
*addeol (monkey peole).

my favourate are the addeol. they look like monkeys and live in the trees, they're really cute but have poor stats.
the truzhe are evil, they used be with ytomim but left and created the pnoflo, which are super killing cat-people.
ytomim are good magic casters and can duel weild.
flasodri are all round average and good at hagling (cheap gear).

going to add hunger, which will slowly get bigger then you'll start losing hp until you eat / die. i'' add a food status variable which is how many rations you have. bu because the races have different eating habits (addeol can't eat meat and pnoflo can only eat meat), you can only buy your food from the right people (your home home will centainly). there will be other food items, that are specail or used in quests as well.

please tell me what you think of these ideas. i like my names for the races :D if you have any ideas please tell me :roll:

007bond
27 Feb 2005, 08:49
It looks like you've made a lot of progress over the weekend. keep at it.

Elexxorine
28 Feb 2005, 18:40
actually funny story, my comp broke and dont have the lastest copy backed up :lol: i only have a really old version saved on my hotmail :o yeah i know, i stupid but it wasn't my fault, i was using my mum's cos mine broke 'bout a year ago now and still not fixed but her comp's crap and broke i'm not sure if it's working again now. (i turned it on all the light came on, but the screen didn't show anything and the computer was only making running sound, not loading whirring sounds........ :x )

Elexxorine
03 Mar 2005, 13:40
ok i've found that i had an up to date copy on my hotmail and im using the schools computer as im back in school now..... i've been doing a lot more programming and have a few testers now.....

one problme though: when i installed quest it wnted to change a file in the c drive but i said to ignore as that was all i could do and i have to reinstall quest every day, as it brakes : run time error 339, it doesn't like not having that file changed....... alex, is there any way to fix this? :roll:

Alex
03 Mar 2005, 20:13
Quest requires several DLL and OCX files to be set up in Windows for it to work, so there's no way around having it update files on the C: drive I'm afraid.