Problems with gender and articles
JDBlender
17 Nov 2012, 02:59I'm sorry if this has been covered. I'm new to Quest 5.2 but I think I'm getting the hang of it.
I created an object called 'Indian' which I designated as a Male Character.
I thought that this designation would automatically take care of all the default phrases referring to the character with the correct article. But, for example, when the player types 'hit Indian' the response is 'You can't hit it.' Furthermore when the list of objects in the room comes up it says 'You see a Indian' instead of 'You see an Indian.'
When I look at all the functions and templates for the verbs involved it seems like the language should be being corrected but it is not.
I will attach the file with it's many other imperfections. In order to get the Indian to appear the player enters "s, n, n"
Thanks for any help.
I created an object called 'Indian' which I designated as a Male Character.
I thought that this designation would automatically take care of all the default phrases referring to the character with the correct article. But, for example, when the player types 'hit Indian' the response is 'You can't hit it.' Furthermore when the list of objects in the room comes up it says 'You see a Indian' instead of 'You see an Indian.'
When I look at all the functions and templates for the verbs involved it seems like the language should be being corrected but it is not.
I will attach the file with it's many other imperfections. In order to get the Indian to appear the player enters "s, n, n"
Thanks for any help.
JDBlender
17 Nov 2012, 03:48Never mind, I figured it out.
( I made the mistake of adding a 'Create Indian' line but the Indian was already created just hadn't given it a parent. I guess the created object deleted the original object and all its attributes.)
( I made the mistake of adding a 'Create Indian' line but the Indian was already created just hadn't given it a parent. I guess the created object deleted the original object and all its attributes.)

jaynabonne
17 Nov 2012, 03:56You do indeed have the Indian defined as male - and if you look at the object in the debugger, it has all the right attributes.
However, when the player is but by the snake, you do this:
This creates a brand new object called "Indian", replacing the one you had defined in your file. Not only is not male, it also doesn't have any of the attributes you had given your original Indian object (including descriptions).
If you remove that line, it will work better.
Edit: I see you already caught it in the time I was responding...
However, when the player is but by the snake, you do this:
create ("Indian")
This creates a brand new object called "Indian", replacing the one you had defined in your file. Not only is not male, it also doesn't have any of the attributes you had given your original Indian object (including descriptions).
If you remove that line, it will work better.

Edit: I see you already caught it in the time I was responding...
JDBlender
17 Nov 2012, 04:20Yes, but thanks very much for the help. I still haven't figured out how to make it say "an Indian" instead of "a Indian" but I'm slowly figuring it out. I see that there is a function called GetDefaultPrefix which will return the correct prefix, I just haven't figured out where to plug it in. The code for printing the lists of objects in rooms is hard to find.

jaynabonne
17 Nov 2012, 04:26- Click on Indian
- Click on the Setup tab
- Uncheck "Use default prefix and suffix"
- Enter "an" for prefix.
- Click on the Setup tab
- Uncheck "Use default prefix and suffix"
- Enter "an" for prefix.
JDBlender
17 Nov 2012, 04:29Ah, thanks again. Much easier than what I was trying to do.

jaynabonne
17 Nov 2012, 04:40To be honest, that looks like a bug in Quest. If you have "indian" instead of "Indian", it changes it to "an" for you automatically. GetDefaultPrefix is only looking at lower-case letters... 
Edit: I've added an issue for this.

Edit: I've added an issue for this.