Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: greenpower on Mon 14/11/2011 18:06:08

Title: Having troubles with AGS 3D
Post by: greenpower on Mon 14/11/2011 18:06:08
I've recently downloaded and used AGS 3D module&plugin.
I've done all the things that the manual says, but when I save the room an error apears:
Message                                                                                File                 Line
Failed to save room room1.crm; details below
Error (line 144): PE03: Parse error at "Ags3d_LightType"     Ags3d.ash     144

How I fix this?
Title: Re: Having troubles with AGS 3D
Post by: Khris on Mon 14/11/2011 20:06:03
Did you activate the plugin? (Open the plugin node in the project tree, right click "Ags3d Plugin" and click "Use this plugin".

What I'm wondering though is why you didn't already get an error at line 115, the first line in ags3d.ash that uses a plugin type?
That's what I got when I tried to compile the game without activating the plugin first.
Title: Re: Having troubles with AGS 3D
Post by: greenpower on Mon 14/11/2011 20:23:58
The plugin is activated.
Title: Re: Having troubles with AGS 3D
Post by: Khris on Mon 14/11/2011 21:03:55
Well, it compiles just fine for me. Maybe you accidentally typed something into the script?

This is line 144 in my ags3d.ash:
import static int AddLight(Ags3d_LightType type);

Also, just to be sure, did you copy the other two dlls (alleg42 and zlib1) in your game directory? (Although if not, that would result in a different error message.)
Title: Re: Having troubles with AGS 3D
Post by: greenpower on Mon 14/11/2011 22:18:16
My line is the same. I've erased this line and copy the one you write but the game still doesn't work.
I've got alleg42 and zlib1 in compiled folder.
Title: Re: Having troubles with AGS 3D
Post by: Khris on Mon 14/11/2011 22:52:10
Sorry, I'm at a loss here. Try posting in the AGS 3D thread or PM'ing the author.
Title: Re: Having troubles with AGS 3D
Post by: greenpower on Tue 15/11/2011 00:33:55
Okay. Thank you for helping me.
Title: Re: Having troubles with AGS 3D
Post by: Dualnames on Fri 18/11/2011 10:26:41
You have a parsing error, if you could copy the room script file, I'd point it out. Also a small note, the game if ported to 3.x.x works only when run from the compiled folder, and not when you run it via the engine, or without debugger. I also believe it works till 3.0.
Title: Re: Having troubles with AGS 3D
Post by: greenpower on Fri 18/11/2011 17:38:32
Here is the room script:

function room_Load()
{
  Ags3d.SetCameraPosition(0.0, 0.0, 66.0);      // positions the camera
  Ags3d.SetCameraResetPosition(0.0, 0.0, 66.0); // selects a point to restore the camera
  int l = Ags3d.AddLight(Ags3d_LightType_Directional); // creates a light

  int i = Ags3d.AddCube(0.0, 0.0, -5.0);        // adds a cube for the ground at x,y,z
  Ags3d.SetPrimScale(i, 500.0, 500.0, 10.0);    // stretches it out to cover more space
  Ags3d.SetPrimColour(i, 0, 255, 0);            // makes it green
  Ags3d.SetPrimFilter(i, Ags3d_Filter_All);     // makes it visible and collidable
}
Title: Re: Having troubles with AGS 3D
Post by: Dualnames on Fri 18/11/2011 20:33:52

Ags3d.SetCameraPosition(0.0, 0.0, 66.0);      // positions the camera
Ags3d.SetCameraResetPosition(0.0, 0.0, 66.0); // selects a point to restore the camera
int l = Ags3d.AddLight(Ags3d_LightType_Directional); // creates a light

int i = Ags3d.AddCube(0.0, 0.0, -5.0);        // adds a cube for the ground at x,y,z
Ags3d.SetPrimScale(i, 500.0, 500.0, 10.0);    // stretches it out to cover more space
Ags3d.SetPrimColour(i, 0, 255, 0);            // makes it green
Ags3d.SetPrimFilter(i, Ags3d_Filter_All);     // makes it visible and collidable


This is what is in the manual, and you've copied verbatum, I'm just putting it here for comparison. So that's definitely not the case.

Have you activated both the plugin and imported the module? Perhaps you have forgot about importing the module.
Title: Re: Having troubles with AGS 3D
Post by: Khris on Mon 21/11/2011 21:39:45
The error message mentions "Ags3d.ash" so the module is imported. greenpower has also already confirmed that he activated the plugin.

Also, when I tested this, I tested the game by hitting F5 in AGS 3.2.1 and it ran without problems.

greenpower, what happens if you start a new default game, import the module and activate the plugin and run that? without adding anything to the room script?
Title: Re: Having troubles with AGS 3D
Post by: greenpower on Tue 22/11/2011 15:23:30
Hi,
I made a new game with the default game, the module&plugin, and when i've pressed F5 the same error appeared. I didn't add more things, just this.
Title: Re: Having troubles with AGS 3D
Post by: greenpower on Mon 28/11/2011 21:49:03
I've made another game with an older AGS (2.72) just for discovering if the problem relies in the compatibity, but when I've did all the tutorial said the same error appeared. Does anybody know what's hapening?