ok ive checked every page to do with this and i cant find the sollution so:
here is what ive done:
EDIT - In a new script: (tried putting it in global .ash .asc ect none work)
import int money;
function dialog_request (int hello){
if (hello==1) {
player.Say("I must have that item!");
cGarry.Say("Okay, it costs 5g.");
if (money>=5) { // 5 is price of thing you are buying
player.AddInventory(iPoster);
money-=5;
cGarry.Say("You bought a realy great item!");
dSelling.SetOptionState(1, eOptionOff);
}
else {
cGarry.Say("You don´t have enough money!");
}
}
}
and then in the global script:
int money = 10; //Will give the player 10 dollars to start with
export money;
however it comes up unresolved import when ive done everything (or so i think) that needs to be done
here is what ive done:
EDIT - In a new script: (tried putting it in global .ash .asc ect none work)
import int money;
function dialog_request (int hello){
if (hello==1) {
player.Say("I must have that item!");
cGarry.Say("Okay, it costs 5g.");
if (money>=5) { // 5 is price of thing you are buying
player.AddInventory(iPoster);
money-=5;
cGarry.Say("You bought a realy great item!");
dSelling.SetOptionState(1, eOptionOff);
}
else {
cGarry.Say("You don´t have enough money!");
}
}
}
and then in the global script:
int money = 10; //Will give the player 10 dollars to start with
export money;
however it comes up unresolved import when ive done everything (or so i think) that needs to be done