Object gives internal error whenever I attempt to edit it. [Potentially Solved]

( if you need clarification on anything, don't be scared to ask)

I'm fairly new to this website, and decided to mess around in a attempt to make a firearm. I have it so that it has two attributes, ammo is the attribute of how many bullets it has until it required a reload, and actioned is the attribute where if it is false, the user must use the action verb to set that to true before they can shoot. Its a mess I know, but the initialisation code I have for it is;

set (Vicaro 357, "ammo", 6)
set (Vicaro 357, "actioned", true)

where Vicaro 357 is the name of said firearm
This code simply sets the ammo to 6, and actioned to true. Meaning the weapon can shoot

The code I have for shooting the firearm is this;

if (Vicaro 357.ammo = 0) {
  msg ("A silent click can be heard<br/>[Reload Required]")
else if (Vicaro 357.actioned = false) {
  msg ("Not even a silent click can be heard<br/>[Action Required]")
else {
  msg ("You fire the Vicaro .357")
  set (Vicaro 357, "actioned", false)
  set (Vicaro 357, "ammo", Vicaro 357.ammo - 1)

You don't need to understand the code, but the line set (Vicaro 357, "ammo", Vicaro 357.ammo - 1)I believe has broken the object in such a way that trying to change anything except the description, name or alias causes a "internal error" to occur. I cannot edit the code, add or remove verbs (i do believe its this line, as doing prior testing with a simple number value did not cause this to occur). I cannot even move, copy or delete the object or code without it coming up with a internal error.

All I want to know why this certain line, and to be more specific the value given for the attribute has broken the object so that I can in future avoid making this mistake.


I wonder if Quest gets confused when it sees Vicaro 357.ammo? It needs to know that Vicaro and 357 are part of the same object name. Taking out blank spaces in all of your objects might help, e.g., naming your gun object Vicaro357 or Vicaro_357.

As for why your gun object is permanently corrupted, don't know why either. But you can just either delete and recreate the .ammo attribute, or if that doesn't work, delete/recreate the whole Vicaro357 object (without a blank space).

Optionally, you can also use the "Set a variable or attribute" script, instead of the "Set an object's attribute (named by an expression)" script, i.e.,

Vicaro357.ammo = Vicaro357.ammo - 1

instead of

set (Vicaro357, "ammo", Vicaro357.ammo - 1)

It's a bit simpler and does the same thing. It's also easier to type in local code view.

Replying to Dcoder
I can see where you are coming with the name of the object, I was considering that might be the issue until I actually ran the game. The game seems to be able to handle the name Vicaro 357 (because no errors occur, and the script runs fine), maybe because its it the section of code that see's the text as one object (for what I could assume the comma's are doing.). I will of course rename the object in the next test

Regarding the different approach to the code, I'll give it a try and start fresh with that in mind (I ought to message again if anything goes wrong). However with deleting or editing the current code. Again as mentioned before, the weird thing is I can't delete the object nor move it, so in a sense it has completely locked the game.

Really appreciate the support.

Replying to myself/adding on

It has gotten worse, and I don't mean the object at this point. it appears my entire web browser edited is screwed, what do I mean by this? Well know whenever I attempt to edit any object in any made game/environment. It gives me that foresaken "internal error".

Something i've done has broken the web browser for me.
Looks like the download version is my only hope for the meantime. Anyone got any solutions please lemmie know

Sorry to hear about the online editor crashing your game. I can't really help you as I've never even used the online editor. You already know the next step is to use the desktop editor.

As for salvaging what you can of your game, you can try copying and pasting the ASLX code in full code view to a new game, or opening the bad game in a text editor such as Notepad ++, and then copying/pasting from there.

Replying to Decoder

Its a real shame about it, but I'm looking into it as I type, in the mean time however. You're code HAS helped in the windows version very well. Saving me a lot of time.

Convenient Shortcut: Every time you want to use the "Set a variable or attribute" script, you can just go to the local code view and type =, then go back to the normal GUI view. Quest will automatically convert the = to the "Set a variable or attribute" script in the GUI.

If you're using the web editor, that can happen sometimes.

"Internal error" most often means the server went down. It just means that the code on your screen is out of sync with the server. In that case, you may need to restart the browser before it will work again; or if that doesn't work clearing cookies can help.

There was also a period when the devmode extension didn't work with the online editor and would make games uneditable; I'm not sure if that's been fixed.

It's also possible that an adblocker update, or the data commpression used by some ISPs, could interfere with the web editor. If the problem continues, it may be worth trying it with those things disabled.

This topic is now closed. Topics are closed after 60 days of inactivity.