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

Topics - Maslak791

#1
Hello,

I was trying to run this script, but I keep getting this error no matter what I do or change.

GlobalScript.asc(616): Error (line 616): Variable 'dialog_request' is already defined


and the script:

Code: ags

function dialog_request(int parameter)
  if
  (parameter==1)
  (player.HasInventory(iPapierosy)) 
  (player.LoseInventory(iPapierosy))
  {
  cEgo.Say("Something something");
  cBabcia.Say("yes.");
  
  }
  else
  {
  cEgo.Say("Bye");
}
#2
Hello!

I was trying to find solution for my problem on your forum, but i've failed.
Anyway, I have some trouble with my code. I want to make the character to pick up item form shelf and say what he has found, but if he already has it i just want him to say that theres nothing here. Here's what I've come up with:


function hSzafka_Interact()


{
 
if (player.HasInventory(iCoins))
{
Display("There's nothing here");
}


 
else{
     player.Walk(323, 486, eBlock
     player.AddInventory(iCoins)
     Display("I found some coins")
     }

}

It's giving me this error while compiling- "room1.asc(-10): Runtime error: unexpected eof"

PS. Sorry for my English, I was trying my best
SMF spam blocked by CleanTalk