Error Message

t1techno
23 Mar 2016, 16:53
One of my students is receiving this error and we can not seem to find what is causing it.

Error running script: Error compiling expression 'ListCombine(baselist, verbs)': FunctionCallElement: Could find not function 'ListCombine(Object, QuestList`1)'

Ideas?


Thanks

HegemonKhan
23 Mar 2016, 20:17
I'd check out all of your Verbs (making sure that they fully exist/no-missing/no-misnamed verbs/etc that you're referencing) and/or Objects (their names, making sure they all matchup).

The problem is that these error codes (that you're getting) look like they're the underlying quest error codes (instead of direct error codes of the errors in your user-level/game code), which are getting displayed as they're used to do something, but are unable to do that something because that something has errors with it. The something that has errors is possibly an issue with Verbs or Objects. Has your students been using the GUI~Editor to add in Verbs or have they been directly coding in Verbs (there's actually a bit of stuff involved with creating Verbs, which the GUI~Editor handles for you, so if you're coding in Verbs, you need to be aware of all the things you need to do for creating/adding in Verbs).

also, if you and/or your student and/or school policy don't mind, you can post the student's game code (if it's not that big of a game), we can take a look at it for you, to try to troubleshoot it, or if you want to keep it private, then pm it to one of the site's mods, and they can take a look at it for you.

jaynabonne
23 Mar 2016, 20:54
Be sure that they are assigning the result of ListCombine to something (e.g. a variable). There are a number of things in Quest that look like functions but are actually implemented as part of the expression code. They don't exist as standalone functions but only exist when you have an expression. So this will work:

newlist = ListCombine(baselist, verbs)


but this will give an error:

ListCombine(baselist, verbs)

Not to mention not doing anything useful... :)

The Pixie
23 Mar 2016, 21:13
This is something in the Quest code, as HK says. Quest compiles a list of verbs for objects in the room or inventory, based on a baselist for the object, either inventoryverbs or displayverbs, and (optionally) a set of verbs it guesses it should have. For some reason, baselist is null (which is reported as Object in the error messages).

It is hard to see how you can have it as null. If you set it to null for an object, Quest will get the value from defaultobject instead. You cannot overwrite defaultobject.

I think what I would do is create a new room, then one by one move objects to the new room, and see if it only occurs when a certain object is present. If it does, then delete that object, and create it new.

jaynabonne
23 Mar 2016, 21:31
If you were going to be using a baselist attribute, would you not have to use "this.baselist" or something?

The Pixie
23 Mar 2016, 21:34
I think the error is generated by this function, in core.aslx (almost at the bottom):
  <function name="GetDisplayVerbs" parameters="object" type="stringlist">
if (Contains(game.pov, object)) {
baselist = object.inventoryverbs
}
else {
baselist = object.displayverbs
}

if (not game.autodisplayverbs or GetBoolean(object, "usestandardverblist")) {
return (baselist)
}
else {
if (HasAttribute(object, "generatedverbslist")) {
verbs = object.generatedverbslist
}
else {
verbs = NewStringList()
foreach (attr, GetAttributeNames(object, false)) {
if (ListContains(game.verbattributes, attr)) {
cmd = ObjectDictionaryItem(game.verbattributeslookup, attr)
if (HasString(cmd, "displayverb")) {
displayverb = CapFirst(cmd.displayverb)
}
else {
displayverb = CapFirst(attr)
}
if (not ListContains(baselist, displayverb)) {
list add (verbs, displayverb)
}
}
}
object.generatedverbslist = verbs
}
if (GetBoolean(object, "useindividualverblist")) {
return (verbs)
}
else {
return (ListCombine(baselist, verbs))
}
}
</function>

jaynabonne
23 Mar 2016, 22:05
Ah, ok. I understand now!

t1techno
24 Mar 2016, 19:37
Thanks to all - a check of his verbs and objects revealed the problem and his game is working nicely.

It has been interesting introducing the high school students to the world of Zork and text based games.

XanMag
24 Mar 2016, 20:01
I have sent you a PM. Please check it out. Good luck!

The Pixie
25 Mar 2016, 20:13
t1techno wrote:Thanks to all - a check of his verbs and objects revealed the problem and his game is working nicely.

It has been interesting introducing the high school students to the world of Zork and text based games.

Can you tell us what caused it?