Hey all,
In the little time I have to play around with this, I'm still stuck creating my struct,
Here's the info.
Global Script
Code: ags
Global Script - function
Code: ags
I did the above because some searching on these forums someone said they needed to create the definition in a function. At this point I'm just stabbing in the dark, doing trial and error without any understanding why, hoping I discover what works.
Header Script
Code: ags
Room Script
Code: ags
When I save my work, I get the following error:
Code: ags
Which leads to this
Code: ags
I'm sure I have code in the wrong place, but don't know where. Thanks in advance for any help.
In the little time I have to play around with this, I'm still stuck creating my struct,

Global Script
// main global script file
Char_Mind charminds[2]; // here I want to create an array called charminds using the Char_Mind struct
Global Script - function
#sectionstart create_struct
function create_struct()
{
charminds[cSeller.ID].calmness = -3;
charminds[cSeller.ID].IQ = 90;
charminds[cSeller.ID].prejudice = 75;
charminds[cSeller.ID].name = "SellerDude";
}
#sectionend create_struct
I did the above because some searching on these forums someone said they needed to create the definition in a function. At this point I'm just stabbing in the dark, doing trial and error without any understanding why, hoping I discover what works.
Header Script
// Main header script - this will be included into every script in
// the game (local and global). Do not place functions here; rather,
// place import definitions and #define names here to be used by all
// scripts.
import function create_struct ();
struct Char_Mind
{
int calmness;
int IQ;
int prejudice;
String name;
};
Room Script
#sectionstart hotspot4_a // DO NOT EDIT OR REMOVE THIS LINE
function hotspot4_a()
{
// script for Hotspot 4 (Hotspot 4): Look at hotspot
create_struct();
trust[cSeller.ID] = -6;
Display("Trust for Seller is %d", trust[cSeller.ID]);
Display("Calmness for Seller is %d", charminds[cSeller.ID].calmness);
}
#sectionend hotspot4_a // DO NOT EDIT OR REMOVE THIS LINE
When I save my work, I get the following error:
The problem was In 'Room 1 script'
Error (line 205): undefined symbol 'charminds'
Which leads to this
Display("Calmness for Seller is %d", charminds[cSeller.ID].calmness);
I'm sure I have code in the wrong place, but don't know where. Thanks in advance for any help.