Axe Software Forums
  QuestNet Forum
  Bug, Error?


Author Topic:   Bug, Error?
I think Im Back posted 31-03-2003 06:39 GMT     
So, continuing work on my combat system demo, I make some changes. Notice I get a runtime error 9 when running Questnet with the new changes, so I unchange them, Questnet still gives me the runtime error 9. I fiddle around fixing any tiny thing I could have changed. I have no clue what is causing it, I'll re-code everything in a new text file in the mean time, but if anyone could find the problem in the ASL or a way to fix it, it'd be greatly appreciated.

ASL PASTE...

' "Combat System Demo"

define game <Quest Beta Environment>
asl-version <310>
start <arena>
game info <Version: Beta .01>
error <badcommand; I don't understand what you typed.>
error <badthing; I could not find what you were referring to.>
error <badplace; You can't go there.>
error <itemunwanted; Your offer has been declined.>
error <defaultuse; I don't understand what you typed.>
error <cantdrop; For some reason you can't drop that.>
error <noitem; I could not find what you were referring to.>
error <badexamine; What is it you would like to examine?>
error <badgo; You can't go there.>
error <baduse; I don't understand what you typed.>
error <badgive; Give to whom?>
error <badtake; You can't pick that up.>
error <baditem; I could not find what you were referring to.>
error <baddrop; You are not holding that.>
error <badpronoun; I could not find what you were referring to.>
error <defaultout; You can't go there.>
server start script
background <black>
foreground <white>
'specifies room appearance
description {
msg <[$objectproperty(#quest.currentroom#;title)$]>
msg <#quest.lookdesc#>
if not is <#quest.formatobjects#;> then msg <You see #quest.formatobjects#.>
if not is <#quest.doorways.dirs#;> then msg <Obvious exits: #quest.doorways.dirs#> else msg <Obvious exits: none>
}
server startscript

player startscript {
create room <player%userid%-r-hand>
property <player%userid%-r-hand; held=null>
create room <player%userid%-l-hand>
property <player%userid%-l-hand; held=null>
set string <name; $name(%userid%)$>
property <player%userid%; name=$capfirst(#name#)$>
property <player%userid%; race=Human>
property <player%userid%; look=You see $objectproperty(player%userid%; name)$ the $objectproperty(player%userid%; race)$.|n>
property <player%userid%; STR=$rand(20;100)$>
property <player%userid%; CON=$rand(20;100)$>
property <player%userid%; DEX=$rand(20;100)$>
property <player%userid%; INT=$rand(20;100)$>
property <player%userid%; WIS=$rand(20;100)$>
property <player%userid%; AUR=$rand(20;100)$>
property <player%userid%; CHA=$rand(20;100)$>
property <player%userid%; DIS=$rand(20;100)$>
msg <The command STATS will give you randomized new stats. The INFO command will view your current stats.|n>
}
command <look #@target-object#> do <look>
command <loo #@target-object#> do <look>
command <lo #@target-object#> do <look>
command <l #@target-object#> do <look>
command <take #@target-object#> do <take-check>
command <get #@target-object#> do <take-check>
command <grab #@target-object#> do <take-check>
command <drop #target-object#> do <drop>
command <stats> {
property <player%userid%; STR=$rand(20;100)$>
property <player%userid%; CON=$rand(20;100)$>
property <player%userid%; DEX=$rand(20;100)$>
property <player%userid%; INT=$rand(20;100)$>
property <player%userid%; WIS=$rand(20;100)$>
property <player%userid%; AUR=$rand(20;100)$>
property <player%userid%; CHA=$rand(20;100)$>
property <player%userid%; DIS=$rand(20;100)$>
msg <Your Stats are now...|n|nStrength - $objectproperty(player%userid%; STR)$|nConstitution - $objectproperty(player%userid%; CON)$|nDexterity - $objectproperty(player%userid%; DEX)$|nIntelligence - $objectproperty(player%userid%; INT)$|nWisdom - $objectproperty(player%userid%; WIS)$|nAura - $objectproperty(player%userid%; AUR)$|nCharisma - $objectproperty(player%userid%; CHA)$|nDiscipline - $objectproperty(player%userid%; DIS)$|n>
}
command <info> {
msg <Statistics|n---------------|nStrength - $objectproperty(player%userid%; STR)$|nConstitution - $objectproperty(player%userid%; CON)$|nDexterity - $objectproperty(player%userid%; DEX)$|nIntelligence - $objectproperty(player%userid%; INT)$|nWisdom - $objectproperty(player%userid%; WIS)$|nAura - $objectproperty(player%userid%; AUR)$|nCharisma - $objectproperty(player%userid%; CHA)$|nDiscipline - $objectproperty(player%userid%; DIS)$|n>
}
command <warp to #target-room#> if exists <#target-room#> then {
msg <You focus intently on your destination and begin to plane shift.|n>
goto <#target-room#>
}
else msg <You are unable to grasp an image of your destination.|n>
command <take-do> if ( $objectproperty(player%userid%-r-hand; held)$ = null ) then {
move <#target-object#; player%userid%-r-hand>
property <player%userid%-r-hand; held=#target-object#>
msg <You pick up the #target-object# with your right hand.|n>
}
else {
if ( $objectproperty(player%userid%-l-hand; held)$ = null ) then {
move <#target-object#; player%userid%-l-hand>
property <player%userid%-l-hand; held=#target-object#>
msg <You pick up the #target-object# with your left hand.|n>
}
else msg <Both of your hands are full.|n>
}
end define

define room <arena>
look <Massive stone walls surround you on all sides forming the octogon you stand in. The dirt beneath your feet is hard packed and riddled with traces of footsteps, all around you see remnants of skin and bones.>
properties <title=The Arena>
define object <rack>
properties <prefix=a; look=The rusty old weapons rack is covered with chips and scratches but still stands strong. Hung on the rack you notice a sword, spear, axe and club.|n>
end define
define object <sword>
properties <take; alias=sword prefix=a bone pommelled; look=It appears to be an everyday sword but fitted with a bone pommel.|n>
end define
define object <club>
properties <take; alias=club; prefix=a heavy iron; suffix=| covered with deadly spikes; look=The club appears very sturdy and quite dangerous.|n>
end define
end define

define room <storage>
look <This room contains all character sheets created in the game.>
properties <title=The Store Room>
end define

define procedure <take-check> if here <#target-object#> then {
if property <#target-object#; take> then exec <take-do> else msg <You cannot take that.|n>}
else msg <I could not find what you were referring to.|n>
end define
define procedure <take-do> if ( $objectproperty(player%userid%-r-hand; held)$ = null ) then {
move <#target-object#; player%userid%-r-hand>
property <player%userid%-r-hand; held=#target-object#>
msg <You pick up the #target-object# with your right hand.|n>
}
else {
if ( $objectproperty(player%userid%-l-hand; held)$ = null ) then {
move <#target-object#; player%userid%-l-hand>
property <player%userid%-l-hand; held=#target-object#>
msg <You pick up the #target-object# with your left hand.|n>
}
else msg <Both of your hands are full.|n>
}
end define
define procedure <look> if here <$getobjectname(#target-object#)$> then {
set string <#target-object#; $getobjectname(#target-object#)$>
if property <#target-object#;look> then {
msg <$objectproperty(#target-object#;look)$|n>
}
else msg <You notice nothing in particular about the #look-target#)$.|n>
}
else msg <I could not find what you were referring to.|n>
end define
define procedure <drop>
if ( $objectproperty(player%userid%-r-hand; held)$ = #target-object# ) or ( $objectproperty(player%userid%-l-hand; held)$ = #target-object# ) then {
if ( $objectproperty(player%userid%-r-hand; held)$ = #target-object# ) then {
move <#target-object#; #quest.currentroom#>
property <player%userid%-r-hand; held=null>
msg <You drop the #target-object# in your right hand.|n>
}
if ( $objectproperty(player%userid%-l-hand; held)$ = #target-object# ) then {
move <#target-object#; #quest.currentroom#>
property <player%userid%-l-hand; held=null>
msg <You drop the #target-object# in your left hand.|n>
}
}
else msg <You are not holding that.|n>

end define

Gautier UK posted 31-03-2003 10:16 GMT          
when the error message comes up, what does it say under the Error number? it should give u a few words on what the problem is
I think Im Back posted 31-03-2003 10:41 GMT          
Eh, it's not important. The thing that was triggering it was the alias properties, which is odd because I can have items identified by an alias property on the fly without an error, so, things are always a little adventurous with quest.

Other than that. I stayed up all night, fixed a lot of minor problems with the coding, and I'd say, if I keep working on this... I can implement a wield command and most of the mathematics for a simple/complex combat system. I'll put it up questnet as soon as I'm finished with it and happy about it. I'm not planning on making any mobs to fight so you'll have to wait for another player to log in.

For this preliminary demo I'm thinking I'll implement quite a few factors for the combat system. Like strength modifying attack power/speed, dexterity modifying attack speed/defense, of course weapons and shields will provide according boosts, and maybe I'll try and work in a really basic idea of a spell boost wherein you enter some command and you'll get a boost of strength factored onto your attack or something. I'm thinking, this is all do-able in a day or two. I hope you're all excited because I'm not.

Gautier UK posted 31-03-2003 13:21 GMT          
exited, no....interested, yes. i hope to see it soon =)
Alex posted 31-03-2003 16:38 GMT          
You say the error was caused by your alias properties - possibly due to this line:

properties <take; alias=sword prefix=a bone pommelled; look=It appears to be an everyday sword but fitted with a bone pommel.|n>

which is missing a semicolon between the words "sword" and "prefix".

I think Im Back posted 31-03-2003 18:26 GMT          
Yeah, after I read through the post I noticed that error of course. I corrected it in the asl file but the error persisted. Good looking out though.