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