Recent posts

#11
The Rumpus Room / Re: What song are you listenin...
Last post by TheFrighter - Tue 08/07/2025 15:58:22
Quote from: TheFrighter on Wed 02/07/2025 18:49:47MOD NOTE: Video removed. I understand that it was posted in a humorous manner, and yes, laughing at Nazis, as well as punching them, is an acceptable pastime. But we still have to take into account that, despite the fact that we completely reject this ideology, Mr. West clearly doesn't (rumored mental problems aside) and by platforming him we may be inadvertently enabling him to spread said ideology to a wider audience. Seeing as the UK, as well as the EU, has various laws against the promotion of Nazi propaganda online (Germany, for instance, has already banned the video, where even the title is a violation), and the AGS forums are hosted in the UK, I feel it would be best to err on the side of caution.

My sorry.

_
#12
Yes, the old compiler cannot handle this case for some reason, which I forgot.
I think I tried to investigate once, but it's code is confusing me, so I failed at the time.

You have to call a real function instead:

Code: ags
parent.Children[0]
---->
Code: ags
parent.geti_Children(0)

You can still use the proper syntax when using structs and attributes declared in other script headers.
#13
I don't have AGS to test right now but I think this is the ags3 issue that you can't use attributes in the same script where you declare them. I just remember that it gave me a mystical error message.

This is fixed in ags4 with the new compiler.

If it's this, you would need to call geti_AttributeName(I).
#14
Hello, I'm trying to figure out a problem I'm having with indexed attributes which is a feature I haven't used much in the past.

Here's a summary: I'm working on a pattern to get an indexed value of a managed struct pointer from another managed struct (source link below), which is more or less like this:

Code: ags
managed struct Child {
  int Index;

  import readonly attribute String Name;
  import String get_Name();
}

managed struct Parent {
  import readonly attribute Child* children[];
  import Child* geti_Children(int index);
}


String _names[];
Child* _children[];

String Child::get_Name() {
  return _names[this.Index];
}

Child* Parent::geti_Children(int index) {
  return _children[i];
}


void game_start() {
  _names = new String[8];
  _children = new Child[8];
}


But if I write `parent.Children[0]` in the script and build the game (3.6.2), I get an error:
Code: ags
Error (line unknown): in script 'LayeredCharacter.asc' around line 147: cannot resolve import (bytecode pos 1967, key -1).

The line in question is here:
https://github.com/clickpulp/ags-modules/blob/7c4f28793e072c86c672a1e3b85129e67b6541d6/game/LayeredCharacter.asc#L147

Is there something I'm missing, or is there something not supported in AGS 3.x, or is this a bug?
#15
Quote from: Snarky on Tue 08/07/2025 09:24:04Once AGS 4 is officially released we can hopefully put an end to this issue once and for all (as it produces warnings for unlinked event handlers).

Yes, this is already in 3.6.2, and I've been already getting questions about older templates/projects posting new warnings.
Of course there's a chance that something is not working right in that regard, especially since rooms are compiled separately from the game scripts.

@updoggg which version of AGS are you using?
#16
These warnings are produced in ags3 since 3.6.2.

Quote from: Crimson Wizard on Sun 15/06/2025 00:58:22Editor:

- Editor will now report any missing script functions that are assigned to events, but not present in script, as warnings when compiling the game.
- Editor will now report any script functions that *look like* event functions, but not assigned to corresponding events, as warnings when compiling the game.

#17
Recruitment / Re: Offer Your Services!
Last post by StillElectric - Tue 08/07/2025 09:32:53
Hey everyone. I'm a writer and sound recordist. My girlfriend is starting her voice acting career and is looking for free work. Here is her reel:
https://drive.google.com/file/d/1rcoLDvnP1SI_1vICPhmPxnuXb3W5AMaR/view?usp=sharing
https://www.castingcall.club/KatSmo

Are you making a fun game that needs writing + sound? Hit us up.
#18
Quote from: Khris on Tue 08/07/2025 06:49:25Anyway, it's a very common beginner's problem: you typed or pasted the function into the script yourself and therefore AGS doesn't know it exists.

Once AGS 4 is officially released we can hopefully put an end to this issue once and for all (as it produces warnings for unlinked event handlers).
#19
thanks!! totally overlooked that (and the insert code button)
#20
Screenshots of code... haven't seen those in a long time :-D
Please post code in text form. Like this:

Code: ags
function abc() {
  Display("ABC");
}

Anyway, it's a very common beginner's problem: you typed or pasted the function into the script yourself and therefore AGS doesn't know it exists. You need to open the room's event pane (thunderbolt icon) and link the function by pasting its name into the field next to the event. Check the event pane in the room where it's working to see how it's supposed to be set up.
(See also https://adventuregamestudio.github.io/ags-manual/acintro3.html#adding-some-interaction)
SMF spam blocked by CleanTalk