AGS 3.0.1 Final 2 - Queen's English Edition

Started by Pumaman, Wed 30/01/2008 21:55:37

Previous topic - Next topic

Pumaman

Yeah, this is a tricky one. If the room isn't loaded, AGS can't determine what objects/hotspots/etc are in it, so if you edit any room script except the currently open room it won't be able to pick up the autocomplete.

There are ways around this, such as the editor caching the names of all the room objects, but I'm not sure whether this is a big enough problem to warrant the effort of fixing it...

subspark

Hey Chris! Not much today but I have this annoying inconvenience. It is in the view editor where I click 'animate' in the show preview section. The problem is is if i want to quickly hide the preview section for more room, when I turn it back on again, the 'animate' check box defaults back to an unchecked state.
Just one of those formality things I'm afraid but it's bloody annoying.  ;)

Cheers,
Paul.

Rui 'Trovatore' Pires

It seems we can't name our player character Roger, or else we get:

Code: ags
Error: An item with the same key has already been added.
Version: AGS 3.0.1.28

System.ArgumentException: An item with the same key has already been added. ---> System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at AGS.CScript.Compiler.Preprocessor.PreProcessDirective(String line)
   at AGS.CScript.Compiler.Preprocessor.Preprocess(String script, String scriptName)
   at AGS.Editor.AGSEditor.CompileScript(Script script, List`1 headers, CompileMessages errors, Boolean isRoomScript)
   at AGS.Editor.Components.RoomsComponent.SaveRoomOnThread(Object parameter)
   at AGS.Editor.BusyDialog.RunHandlerOnThread()
   --- End of inner exception stack trace ---
   at AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter)
   at AGS.Editor.Components.RoomsComponent.SaveRoomButDoNotShowAnyErrors(Room room, CompileMessages errors, String pleaseWaitText)
   at AGS.Editor.Components.RoomsComponent.RecompileAnyRoomsWhereTheScriptHasChanged(CompileMessages errors, Boolean rebuildAll)
   at AGS.Editor.Components.RoomsComponent.AGSEditor_PreCompileGame(PreCompileGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.PreCompileGameHandler.Invoke(PreCompileGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.CompileGame(Boolean forceRebuild, Boolean createMiniExeForDebug)
   at AGS.Editor.Components.BuildCommandsComponent.CompileGame(Boolean forceRebuild)
   at AGS.Editor.Components.BuildCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.GUIController._mainForm_OnMenuClick(String menuItemID)
   at AGS.Editor.MainMenuManager.MenuEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

subspark

Haha! Good eyes, Rui. I ran into that problem a while ago but didn't think anything of it.
Adventure gaming will never ever be truly complete without a Roger.

I do agree with you, I think we should be able to name our characters anything we like.

Cheers,
Paul.

monkey0506

#84
I keep getting a strange error reportedly having to do with Game.GetLocationName:

Quote---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x00442C0B ; program pointer is -42, ACI version 3.01.1010, gtags (84,21)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.

in "MonkeyTemplate.asc", line 81
from "MonkeyTemplate.asc", line 205


Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK   
---------------------------

I am working with my MonkeyTemplate template/module right now of course. I have tried moving the line:

Code: ags
String name = Game.GetLocationName(mouse.x, mouse.y);


To various locations throughout my script, but I can't seem to get it to work.

The crash file is here. Hopefully I'm not just doing something stupid.

subspark

Are you working on A SCUMM Module now monkey? Perhaps we could continue the SCUMM template we were working on a while back seeing Ashen has disappeared of the map. It's got artwork, sound and everything. PM me if you want to pick up where we left off because I don't want you to start from scratch if you don't have to.  ;)

Cheers mate,
Paul.

Sadistyk

Hello. I tried to write a region's "walk onto" event today, and when I went to save the game this showed up:

Code: ags

Error: Ya se agregó un elemento con la misma clave.
Version: AGS 3.0.1.28

System.ArgumentException: Ya se agregó un elemento con la misma clave. ---> System.ArgumentException: Ya se agregó un elemento con la misma clave.
   en System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   en System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   en AGS.CScript.Compiler.Preprocessor.PreProcessDirective(String line)
   en AGS.CScript.Compiler.Preprocessor.Preprocess(String script, String scriptName)
   en AGS.Editor.AGSEditor.CompileScript(Script script, List`1 headers, CompileMessages errors, Boolean isRoomScript)
   en AGS.Editor.Components.RoomsComponent.SaveRoomOnThread(Object parameter)
   en AGS.Editor.BusyDialog.RunHandlerOnThread()
   --- Fin del seguimiento de la pila de la excepción interna ---
   en AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter)
   en AGS.Editor.Components.RoomsComponent.SaveRoomButDoNotShowAnyErrors(Room room, CompileMessages errors, String pleaseWaitText)
   en AGS.Editor.Components.RoomsComponent.SaveRoomAndShowAnyErrors(Room room)
   en AGS.Editor.Components.RoomsComponent.AGSEditor_PreSaveGame(PreSaveGameEventArgs evArgs)
   en AGS.Editor.AGSEditor.PreSaveGameHandler.Invoke(PreSaveGameEventArgs evArgs)
   en AGS.Editor.AGSEditor.SaveGameFiles()
   en AGS.Editor.Components.FileCommandsComponent.CommandClick(String controlID)
   en AGS.Editor.ToolBarManager.ToolbarEventHandler(Object sender, EventArgs e)
   en System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   en System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   en System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   en System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   en System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   en System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   en System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   en System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   en System.Windows.Forms.Control.WndProc(Message& m)
   en System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   en System.Windows.Forms.ToolStrip.WndProc(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


The "Error" says: "An element with the same key has already been added".

Here's the event:

Code: ags

function region1_WalksOnto()
{
	player.ChangeRoom(7, 160, 200);
}

naltimari

Quote from: Sadistyk on Mon 03/03/2008 13:41:33
Code: ags

Error: Ya se agregó un elemento con la misma clave.
Version: AGS 3.0.1.28


I really question the value of localization of internal error messages. I think it gets more difficult to get support from the authors, which may not understand the error, or even to google for it, since the solutions may not be available in the same language as the error. Anyway, it's just my personal view.

To help spot the problem, it seems the error message in plain english is:

Code: ags
Error: An item with the same key has already been added.


Which is the same as the error posted a couple of messages above.

SupSuper

Quote from: naltimari on Mon 03/03/2008 13:53:32
Quote from: Sadistyk on Mon 03/03/2008 13:41:33
Code: ags

Error: Ya se agregó un elemento con la misma clave.
Version: AGS 3.0.1.28


I really question the value of localization of internal error messages. I think it gets more difficult to get support from the authors, which may not understand the error, or even to google for it, since the solutions may not be available in the same language as the error. Anyway, it's just my personal view.
Well they're .NET Framework errors, which usually follow the Windows language. Not every developer is english. :)

Non-english users can just translate them for english developers, like Sadistyk did.
Programmer looking for work

naltimari

Quote from: SupSuper on Mon 03/03/2008 17:16:42
Well they're .NET Framework errors

Yes, I know that.

Quote from: SupSuper on Mon 03/03/2008 17:16:42
Not every developer is english. :)

I'm aware of that too, and btw I'm brazilian, nevertheless I stand by my argument. To me, it's very strange to use the whole framework in english (function names, classes, etc), and then receiving error messages in a different (localized) language.

There are certain 'keywords' that appear in error messages which help to debug or understand the problem, and when they are localized, you have to 'guess' or 'reverse translate' to discover what the error was really about.

Anyway, like I said, it's just a personal view, I didnt want to start a discussion. Unless CJ is considering localization of error messages... :) but i think he's not... ;)

subspark

QuoteNot every developer is english.
Ah, but the one person likely to fix the error is... :o

So with the convenience of CJ and the would-be international translators in mind, I am inclined to agree with Naltimari although I'm not sure how much can be done to counter the behavior of the windows .net framework.

Cheers,
Paul.

Pumaman

QuoteIt is in the view editor where I click 'animate' in the show preview section. The problem is is if i want to quickly hide the preview section for more room, when I turn it back on again, the 'animate' check box defaults back to an unchecked state.

I'll take a look at this, but it's not top priority ;)

QuoteIt seems we can't name our player character Roger, or else we get:

Thanks for the report -- this crash should actually be a compile error "Macro already defined". Does this seem like a reasonable error message (ie. could you have named two things the same), or does it seem to be erroring without good reason?

QuoteI keep getting a strange error reportedly having to do with Game.GetLocationName:

I tried to download your crash dump file but got a Server Not Found error. Can you check the URL?

QuoteHello. I tried to write a region's "walk onto" event today, and when I went to save the game this showed up:
The "Error" says: "An element with the same key has already been added".

Thanks, this looks like the same error that Rui is getting. Could you have potentially named two views/characters the same before it occurred?

Sadistyk

No, but I assigned the same view number to the "NormalView" and "SpeechView" properties of the same character. Later, I set the "SpeechView" to 0, but I still get the same error.

Rui 'Trovatore' Pires

No, I don't seem to have anything else called "cRoger"...
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

GarageGothic

#94
I was surprised to see the nice new debug menu for teleporting between rooms. However, I have one small request: Could the text field please be empty by default? Perhaps it's just a habit from the old functionality, but by reflex I keep pressing CTRL-X, typing the room number I want to go to (without using backspace) and pressing Enter, leading to the game crashing because I teleported to a non-existing room (for example I intend to teleport from room 8 to room 2 but end up in room 82).

While I appreciate the use of displaying the current room number, there's rarely any need to teleport to the same room that you're in. Perhaps there could be a label displaying "Current room:" at the top right corner of the menu instead?

Edit: Are anybody else having problems with some anti-aliased GUI fonts being displayed as transparent in the latest beta (on an otherwise solid GUI you can see the room's background through the letters, while the antialiased edges are still in color)? I haven't been able to find any consistency to it; they are all truetype fonts using a wide range of colors, yet some display normally and some are see-through. None of them use outlines. Once I turn off anti-aliasing, they all appear normal. This is in DirectX 5 mode, I can't test Direct 3D on this computer. It happens in full screen as well as windowed mode, and independent of whether "downgrade to 16-bit color" is checked (game is 32-bit, 640x480).

Edit 2: Added screenshots. Seeing them upscaled, I realize that it's not the antialiased edges that are still displayed, as I previously thought but just random(?) pixels of the font. The room background here uses the magical pink color, but the effect in other rooms is the same. It's just easier to see the nature of the issue here.

Font with anti-aliasing:


Font without anti-aliasing:


Edit 3: Problem solved! See below.

monkey0506

Hmm...I'm guessing my server just didn't like the DMP file...since I was too lazy to archive it. :D

I've mirrored it on my Brinkster space: CrashInfo.dmp RAR

Eep I always seem to have hosting issues. Maybe I should just look into actually paying for this stuff. 8)

GrogGames

(i don't speak english very well, I'm from argentina, sorry if you don't understand)

I get this error in our game

Code: ags
Error: Index was outside the bounds of the array.
Version: AGS 3.0.1.28

System.IndexOutOfRangeException: Index was outside the bounds of the array. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at AGS.CScript.Compiler.Preprocessor.RemoveComments(String text)
   at AGS.CScript.Compiler.Preprocessor.Preprocess(String script, String scriptName)
   at AGS.Editor.AGSEditor.CompileScript(Script script, List`1 headers, CompileMessages errors, Boolean isRoomScript)
   at AGS.Editor.AGSEditor.CompileScripts(Object parameter)
   at AGS.Editor.BusyDialog.RunHandlerOnThread()
   --- End of inner exception stack trace ---
   at AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter)
   at AGS.Editor.AGSEditor.CompileGame(Boolean forceRebuild, Boolean createMiniExeForDebug)
   at AGS.Editor.Components.BuildCommandsComponent.CompileGame(Boolean forceRebuild)
   at AGS.Editor.Components.BuildCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.ToolBarManager.ToolbarEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

i am using the module Scrolling Dialog 2.0 Beta ,  i don't know if that is related with this error. But in Ags 3.0 don't happen.

thanks!

Dave Gilbert

#97
I get a similar error as rui.  I have two rooms in my game.  I create a third blank room and can compile the game fine.  Whenever I make any changes to the new room, I get this message:

Quote
Error: An item with the same key has already been added.
Version: AGS 3.0.1.28

System.ArgumentException: An item with the same key has already been added. ---> System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at AGS.CScript.Compiler.Preprocessor.PreProcessDirective(String line)
   at AGS.CScript.Compiler.Preprocessor.Preprocess(String script, String scriptName)
   at AGS.Editor.AGSEditor.CompileScript(Script script, List`1 headers, CompileMessages errors, Boolean isRoomScript)
   at AGS.Editor.Components.RoomsComponent.SaveRoomOnThread(Object parameter)
   at AGS.Editor.BusyDialog.RunHandlerOnThread()
   --- End of inner exception stack trace ---
   at AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter)
   at AGS.Editor.Components.RoomsComponent.SaveRoomButDoNotShowAnyErrors(Room room, CompileMessages errors, String pleaseWaitText)
   at AGS.Editor.Components.RoomsComponent.SaveRoomAndShowAnyErrors(Room room)
   at AGS.Editor.Components.RoomsComponent.AGSEditor_PreSaveGame(PreSaveGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.PreSaveGameHandler.Invoke(PreSaveGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.SaveGameFiles()
   at AGS.Editor.Components.FileCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.ToolBarManager.ToolbarEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Pumaman

#98
Ok, I need to get to the root cause of this issue, so I've uploaded a beta 3a. This is not a full new release, but just the latest build that I have, which should fix this crash and reveal what's behind it.

QuoteI keep getting a strange error reportedly having to do with Game.GetLocationName:

Hmm, does this only happen in a particular room? How often does it crash? Can you upload a game that demonstrates the problem?

GarageGothic

#99
Thanks for the CTRL-X fix, CJ.

SOLVED! See Edit 2 for detail.
I just discovered that the transparent AA text on GUIs bug I mentioned above isn't isolated to text. While testing the verbcoin mode from my game, I got this:



The hand is supposed to be grey, but here it's transparent (creating a see-through hole in the solid GUI). Perhaps you can even glimpse a bluecup object behind the GUI.

Edit: I think I now worked out why it affects some sprites/labels but not others: If the GUI has a background image, all text and images render fine. If the GUI background is a solid color, AA text is see-through. Button sprites that don't have transparent areas look fine, those that do are displayed in this way (transparency in the sprite is unaffected, but the non-transparent areas "punch holes" through the GUI).


Edit 2: Aha! I think I got it! It's related to the BackgroundImage property. If it's set to 0, everything is as it should be. If it's set to -1 (as it for some reason was for some of the GUIs - despite never having caused trouble before) it displays as described. I'm not sure if this is as designed? Anyhow, now I'm setting all the BackgroundImages to 0 and the issue should be solved.

SMF spam blocked by CleanTalk