run time error 6
darkgoddessnight
02 Nov 2006, 17:00I keep getting a runtime error 6 overflow. It started in my original test document so I created a new one from scratch and started copying my code to test each part. On my first part, I got it again, so I retyped everything by hand looking for where the problem might be, but everything seemed perfect so I don't know where the problem is.
Here is my code:
' "test 2"
' Created with QDK 4.0 Beta 1 - UNREGISTERED VERSION
!include <net.lib>
define game <test 2>
asl-version <390>
gametype multiplayer
start <test room>
game info <Created with QDK 4.0 Beta 1 - UNREGISTERED EVALUATION VERSION.>
end define
define options
login off
register on
end define
define synonyms
end define
define room <test room>
define object <races>
invisible
properties <total=13; 1=Aquarian; 2=Avarian; 3=Draconian; 4=Dwarf; 5=Elf;
6=Fae; 7=Guartolan; 8=Gnome; 9=Halfling; 10=Human; 11=Kitharran; 12=Ogre; 13=Oried>
end define
end define
define procedure <charcreation_race>
set string <choice[userid]; null>
set string <valid[userid;null>
msg <what is thy race? 1-$objectproperty(races; total)$|n>
for <i;1;$objectproperty(races; total)$> msg <%i%. $objectproperty(races; %i%)$|n>
enter <choice[userid]>
for <i; 1; $objectproperty(races; total)$> {
if ( #choice[userid]# = %i% ) then set string <valid[userid]; true>
}
if ( #valid[userid]# <> true ) then {
msg <That is not a valid choice.|n>
do <charcreation_race>
} else {
do <racedesc#choice[userid]#>
set string <racechoice[userid]; $objectproperty(races; #choice[userid]#)$>
msg <Do you want to be #racechoice[userid]#?|n>
enter <answerrace[userid]>
if ( #answerrace[userid]# = yes ) then {
msg <You are now a #racechoice[userid]#.|n>
property <player%userid%; race=racechoice[userid]>
do <typerace#choice[userid]#>
}
}
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define
can someone tell me what is wrong please?
Thankyou
Here is my code:
' "test 2"
' Created with QDK 4.0 Beta 1 - UNREGISTERED VERSION
!include <net.lib>
define game <test 2>
asl-version <390>
gametype multiplayer
start <test room>
game info <Created with QDK 4.0 Beta 1 - UNREGISTERED EVALUATION VERSION.>
end define
define options
login off
register on
end define
define synonyms
end define
define room <test room>
define object <races>
invisible
properties <total=13; 1=Aquarian; 2=Avarian; 3=Draconian; 4=Dwarf; 5=Elf;
6=Fae; 7=Guartolan; 8=Gnome; 9=Halfling; 10=Human; 11=Kitharran; 12=Ogre; 13=Oried>
end define
end define
define procedure <charcreation_race>
set string <choice[userid]; null>
set string <valid[userid;null>
msg <what is thy race? 1-$objectproperty(races; total)$|n>
for <i;1;$objectproperty(races; total)$> msg <%i%. $objectproperty(races; %i%)$|n>
enter <choice[userid]>
for <i; 1; $objectproperty(races; total)$> {
if ( #choice[userid]# = %i% ) then set string <valid[userid]; true>
}
if ( #valid[userid]# <> true ) then {
msg <That is not a valid choice.|n>
do <charcreation_race>
} else {
do <racedesc#choice[userid]#>
set string <racechoice[userid]; $objectproperty(races; #choice[userid]#)$>
msg <Do you want to be #racechoice[userid]#?|n>
enter <answerrace[userid]>
if ( #answerrace[userid]# = yes ) then {
msg <You are now a #racechoice[userid]#.|n>
property <player%userid%; race=racechoice[userid]>
do <typerace#choice[userid]#>
}
}
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define
can someone tell me what is wrong please?
Thankyou
I think Im Dead
02 Nov 2006, 18:34Well firstly I spot that you have a "valid[userid]" in there that is missing the last bracket and instead comes off as "valid[userid". Try that for starters.
darkgoddessnight
03 Nov 2006, 13:31thanks, though I actually found that just a bit after I posted, along with a few other errors, however the original didn't have any errors and worked fine before I downloaded the new quest and discovered that anything I open with the new qdk has some trouble working afterwards.