I recognized strange behavoirs with my struct.variables.
i use modules and structs.
[code]
// RPG.ash
struct Roc_Struct_RPG
{
String name;
int money;
int searching;
.
};
Roc_Struct_RPG thief;
export thief;
[/code]
[code]
//RPG.asc
function game_start()
{
thief.money = 1000;
thief.searching = 5;
}
[/code]
now i try to use that vars and get strange results,
when i use the vars in the RPG.asc file, all is fine the values are correct,
[code]
RPG.asc
player.say("My Money = %d", thief.money); // value ist correct
[/code]
but when i try to use the vars in another module or the room scripts.
[code]
othermodule.asc
player.say("My Money = %d", thief.money); // value is wrong (always 0)
[/code]
[code]
roomxx.asc
player.say("My Money = %d", thief.money); // value is wrong (always 0)
[/code]
i get vars with value 0.
what is wrong in this case?