Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - strazer

#681
Maybe missing semi-colon at the end?

// main script header
  import function GoToCharacterEx(int charidwhogoes, int charidtogo, int direction, int xoffset, int yoffset, int NPCfacesplayer, int blocking);

The error message gives you the script line where the error occurs. Please post the entire error message and some script from around that line.
#682
??? Nothing what? Have you tried to fix it? What's wrong?

As Ashen said:

Quote from: strazer on Wed 21/12/2005 21:24:40
The error means that the function header in the global script, e.g.
  function GoToCharacterEx(int a, int b, int c) {
does not match the import statement in the script header, e.g.
  import function GoToCharacterEx(); // causes error because parameters are missing
instead of
  import function GoToCharacterEx(int a, int b, int c); // correct

The reason for the error is this (from the manual):
Quote from: Manual
Also, the script editor is now much better at checking your script for errors. You may well find that a script which compiled fine before no longer works on 2.7. Hopefully the error message should direct you towards fixing any problems.
#683
Quote from: Sonja on Sun 01/01/2006 20:51:54Error (line 28): undefined symbol 'eModeInteract'

Just use "eModePaw" instead. The latter part of the word is generated from the name you give the cursor in the editor.
#684
IMO it would be better to just define an enum like this:

Code: ags

enum Keycodes {
	eKeycode_Backspace = 8, 
	eKeycode_Enter = 13, 
	eKeycode_Esc = 27, 
	eKeycode_Space = 32, 
	eKeycode_Tab = 9, 

	eKeycode_ArrowDown = 380, 
	eKeycode_ArrowLeft = 375, 
	eKeycode_ArrowRight = 377, 
	eKeycode_ArrowUp = 372, 

	eKeycode_Num5 = 376, 
	eKeycode_NumEnd = 379, 
	eKeycode_NumHome = 371, 
	eKeycode_NumPgDn = 381, 
	eKeycode_NumPgUp = 373, 

	eKeycode_F1 = 359, 

...and so on.

So in your example it would be

Code: ags

if (IsKeyPressed(eKeycode_ArrowRight) == 1) {


Here is my module: http://www.strazer.net/ags/Keycodes.zip
#685
Have you defined the enum in the script header? Otherwise it's unknown to anything outside the module script, including the function import line.
#686
Yeah, by making it bigger I meant adding a pixel of empty space.

Internally AGS always uses the lower-res coordinates so there are no problems when playing hi-res games at lower resolutions (configurable in the game setup).
#687
What file format is the pic in?
What paint program do you use?
What AGS version?
Care to upload the pic for us to test it?
#688
Quote from: CJObjects are placed with 320x240-res co-ordinates, so at 640x480 you can only place them on even pixels.

So if you have problems placing the object exactly, try making the object graphic a pixel bigger.
#689
Manual -> Tutorial -> Setting up the game -> Conversations
#690
Beginners' Technical Questions / Re: manual?
Fri 30/12/2005 22:16:10
Press F1 when the editor is open or double-click "ags-help.chm" in your AGS directory to view it with AGS closed.
There is also an online version.
#691
Have you read the HOWTO?
You can run games compiled for DOS with the appropriate Windows engine.

AFAIK the only difference between games compiled for DOS and games compiled for Windows is the engine (ACDOS.EXE or ACWIN.EXE) that gets bundled into the game exe. So the exe contains the game and the engine and if you want, you can use another engine to run the game.
#692
Also make sure to also check if the character is in the same room the player is in, otherwise the condition will be true even when the NPC is an another room.
#693
Advanced Technical Forum / Re: AGS for 64-bit
Thu 29/12/2005 02:24:59
Elliott, most of your posts are so short you come off sounding rather rude.
Please make an effort to explain your opinions in more detail.
#694
Better yet, for AGS v2.70 and below, define each string as an array of characters (letters). This allows you to export/import it:

Code: ags

// main script

char vGive[200];
export vGive;
// and same for the others


Code: ags

// main script header

import char vGive[200];
// and same for the others


In AGS v2.71, use the "String" type instead of "string" and export/import that.
You might have to adjust other parts of this tutorial as well, though.
#695
Please, we need more info to get to the bottom of this:

Does it happen every time?
Does it also happen if you close all other programs like virus scanners and the like?
Does killing the process via the task manager help?

Chris, there are other people having similar problems with v2.70: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=24072.msg299743#msg299743
#696
Quote from: Radiant on Sat 07/01/2006 21:48:14It seems to no longer occur on the latest full build of AGS. Since it was a heisenbug I can't fully guarantee it, but I've tested it long enough to be 99% certain.
#697
Quote from: Deax Strife on Mon 26/12/2005 22:42:53Error (line 449): Function decleration has wrong number of arguments to prototype

Quote from: strazer on Wed 21/12/2005 21:24:40
The error means that the function header in the global script, e.g.
  function GoToCharacterEx(int a, int b, int c) {
does not match the import statement in the script header, e.g.
  import function GoToCharacterEx(); // causes error because parameters are missing
instead of
  import function GoToCharacterEx(int a, int b, int c); // correct

The templates have been written with older versions of AGS and they are not updated regularly so such errors are to be expected.
#698
Don't declare variables/pointer in the main script header.
Doing this creates separate instances of said variable for the main script and each room. Changing the value in a room then doesn't affect any of the other variable instances. They're independent of each other, just share the same name.

Instead, you have to define the variable in the main script, export it, then import it into the main script header.
#699
Just as you did with "gui" and "object", rename the "hotspot" variable to "myhotspot", for example.

From the manual:

Quote from: Manual
Is there anything else I should watch out for?

Because of the new additions, the script language has more reserved words than before. For example, words like "gui", "object" and "hotspot" are now reserved (since they are used to access the global arrays). If your script uses any variables with these names, it will no longer work. You'll need to change the variable name in order to compile.
#700
Yes, you have to enclose multiple commands within brackets, otherwise the conditional only works on the first command. Your code is the same as

Code: ags

  if (parameter==6) cGuy.Walk(70, 115, eBlock);
  player.ChangeRoom(22); // this happens every time


Try this instead:

Code: ags

  if (parameter==6) { // note the opening bracket
    cGuy.Walk(70, 115, eBlock);
    player.ChangeRoom(22);
  } // closing bracket


Don't forget to do the same with your other parameters as well:

Code: ags

  if (parameter==7) {
    cJil.LockView(20);
    cJil.Animate(0, 4, eRepeat,eNoBlock, eForwards);
  }
SMF spam blocked by CleanTalk