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

Messages - 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
@Cerno
There are no visible coins for the player other then ones in the inventory :). Player gets coins from interacting with hSzafka (Szafka means cupboard in polish, btw. :)).
Also, I know this is not the right thread to ask but could you briefly explain how to make text appear when players cursor hovers over the item? I was playing around with "Moves mouse over hotspot" the text appears in the middle of screen and it disappears only if player clicks the mouse

@Khris
This will surely come in handy :).
#3
Wow, It's working perfectly! Thank you very much! This is programming at its finest haha
#4
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