ParseError weirdness

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:smile: :sad: :eek: :shock: :cool: :-x :razz: :oops: :evil: :twisted: :wink: :idea: :arrow: :neutral: :mrgreen:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: ParseError weirdness

Re: ParseError weirdness

by Ice Cream Jonsey » Mon Mar 03, 2025 8:14 am

Okay, Juhana's .hex file inspector helped a little: https://hugoif.github.io/hex-tools/

I can see that the first problematic area is object 940. I can see that it thinks it's trying to access 969, which is a "door." I don't know why it is doing these things, but that confirms what we are seeing. (Also, reading through the game on the inspector is a good way to find some bugs and spelling errors, I think.)

Hopefully there is not a limit of 940 objects in a Hugo game, but if there is, I at least can work around that.

Re: ParseError weirdness

by Ice Cream Jonsey » Wed Feb 26, 2025 8:47 am

Yeah, I think this is the same issue. I just sent you an invite over Github so that you can eventually download the repo.

I had better solve this now, clearly "moving" it around doesn't work, and it's going to end up in some spot that is critical for the game.

(Although if it really is just one room, I could get fake clever and avoid it by sealing the room off. I guess? Like, the room right now just leads into a store on a map, I could move that to be anywhere.)

Re: ParseError weirdness

by Roody_Yogurt » Tue Feb 25, 2025 11:45 pm

We think this is the same issue as the other year where adding a room made the game unplayable after a certain point, right? I remember I debugged that at the time and it didn't seem there was anything wrong on the code execution side of things. I think you're right that the game files are getting a dead zone, and I even have a suspicion on where in the compiler/interpreter side of things the problem could be. I'll write an e-mail about it.

Re: ParseError weirdness

by Ice Cream Jonsey » Tue Feb 25, 2025 11:21 pm

I think I have this in a very reproduceable state. I made a new character, and a store for her tonight. If she exists, then I can't get into a room. The game thinks the room is a door.

If I don't have those things in the game, neither the character nor her store, then I can get into the room.

Time to look at the debugger and see what on earth it thinks is going on. I may need to pay someone for their time to help me on this one if I can't figure it out.

Re: ParseError weirdness

by AArdvark » Sun Jan 26, 2025 7:54 am

Uh oh, time to flip disk over and press enter

Re: ParseError weirdness

by Ice Cream Jonsey » Sun Jan 26, 2025 1:26 am

Roody_Yogurt wrote: Sat Jan 25, 2025 11:51 pm It could very well be Hugo running out of memory as you suspect, as your game is pretty big and you were running into that other weird bug months ago. Still, can the plural_word property be more than one word like that? I think Hugo's plural parsing code uses plural_word for checking against the word array, so it's definitely expecting it to be one word.
Yeah, what I think is happening is that there is .... I dunno, a "dead spot" in the game's hex file. It has been in a room far into the game, then I saw it with a monster towards the end of the monster array. And each time I have been moving the included .hug files around. Tonight, I was able to see it with the baton item (second weapon), because I moved the brass knuckles around (which was the third). I just moved items.hug around and it doesn't appear there.

So I need to cut some areas of the game, sure, because otherwise I am just hoping that the problem area isn't in a critical part of the game, and that isn't a good idea. I really don't want it in something impossible to track, so I moved the music files up. (I am considering cutting music completely at this point, to be honest, but that is a whole other thing.)

Argh. Part of me wants to see the bug again and then see if I can look at the .hex file with an editor and see if there's anything obvious there.

Just to track it, the current size of the cyberganked.hex file is 985 kilobytes.

Re: ParseError weirdness

by Roody_Yogurt » Sat Jan 25, 2025 11:51 pm

It could very well be Hugo running out of memory as you suspect, as your game is pretty big and you were running into that other weird bug months ago. Still, can the plural_word property be more than one word like that? I think Hugo's plural parsing code uses plural_word for checking against the word array, so it's definitely expecting it to be one word.

Re: ParseError weirdness

by AArdvark » Sat Jan 25, 2025 3:21 am

You just tell Hugo to take it all!

Re: ParseError weirdness

by Ice Cream Jonsey » Fri Jan 24, 2025 11:46 pm

*Moving* the location of the brass knuckles in the objects.hug file seems to have fixed the error.

This scares me a lot, I wonder if I am making a game that is too big for Hugo. I gotta scale some stuff down and cut something.

Re: ParseError weirdness

by Ice Cream Jonsey » Fri Jan 24, 2025 11:38 pm

Ok, I took another item and copied it. I gave it the itemnumber of 3. I gave it the name and noun of just "brass". When I go to look at it... I am asked, which brass do I mean, the brass or the brass?

There is only one item in the game called that. What the heck??

ParseError weirdness

by Ice Cream Jonsey » Fri Jan 24, 2025 11:31 pm

I am seeing this.... but let me tell you all how:

Below is my definition for an object called brassKnuckles. It SEEMS like the debugger is trying to go to ParseError(8), which is the ambiguity one. Which makes no sense to me, because no other item in the game has the word "brass".

If I remove the picture for this item, it will not give me the error. I tried using a different picture. I tried using a picture that I know works. WTF?

Anyone got an idea what might be going on?

Image

Code: Select all

storeItem brassKnuckles "brass knuckles"
{
nouns "knuckles"
adjective "brass"
article "some"
plural_word "brass knuckles"
itemnumber 3
in_scope gameMaster
weapon_dam_min 1
weapon_dam_max 5
worth 10
is plural
itemtype "weapon"
primary_attack "punch"
primary_attack_plural "punches"
is blunt_combat_object, plural
criticalHit 0
is not flammable
burst_capable 0
is createable

	long_desc
	{
		"This weapon is a piece of metal fashioned around the fingers of one hand. ";

		if GameEvents[14] = 0
		{
			GameEvents[14] = 1
			"Brass knuckles are a handheld melee option for all classes in the Gank except for the
			horned-up Sado-masochist class that went extinct within a single generation." ;
		}
		else
		{
			"";
		}

		" Brass knuckles do blunt damage against foes."

		machinistCheckForWeapons(self.itemnumber)
		printWhoHasItem(self.itemnumber)		
	}
	facepic "CGAV01", "brassKnuckles01"
}


Top