Quote:
Originally Posted by chrsschb
That got his dialogue working, now the saylink for [$potential] isn't working. All I get is []. I've tried changing the words around and using different saylinks and get the same result.
The handins work too but I'm still getting the "item returned" message even though the handins were successful.
|
That's because you are defining saylinks with the 'my' which declares variables only to the enclosing block, meaning they will not traverse outside of the block you have them defined. Right now they are defined at the top level block of the sub EVENT_SAY routine and they will flow through the entire say dialogue just fine. If you take out 'my' and say in a specific situation where a player goes in to that zone, and that script was cleanly loaded and they tried to hand in items it wouldn't work either because they did not speak to the NPC to define those variables at the top of the sub routine. If you are going to pass saylink variables throughout the entire script it is better to put them all in sub EVENT_SPAWN because variables will be defined on spawn. Otherwise if you only need that saylink in sub EVENT_ITEM, simply define it within the sub EVENT_ITEM block.
Does this answer your questions and issues?
Let me know.
~Akkadius