Little problem?

Post » Mon Jun 18, 2012 3:26 am

Hello,

I have a little problem with getting a reward for just a simple conversation with any NPC.


I've created the full dialogue with all the sub topics and this is working fine.

Now one sentence should end with getting 1 gold.



I've tried the whole Beth tutorial about creating a script like this.


Scriptname myscript extends Quest ConditionalMiscObject Property Gold001 AutoInt Property RewardAmount = 1 Autofunction RewardPlayer()Game.GetPlayer().AddItem(Gold001, RewardAmount)EndFunction



The script shows no errors but if i add the script to the response of the dialogue i dont get the gold.



I've tried everything like Quest Stages and and and. I just dont get my gold by choosing the answer which could give it to me.

Something is wrong.

Any ideas? Thanks in advance.




/EDIT: Little example.

You: Hey, give me a dollar!
NPC: Ok. (You get 1 dollar)
User avatar
Stu Clarke
 
Posts: 3326
Joined: Fri Jun 22, 2007 1:45 pm

Post » Mon Jun 18, 2012 11:11 am

Try making it a bit simpler, just to see if it works. Instead of assigning your reward amount to a variable (which I think you may be doing wrong) just put an amount in the give command:



Game.GetPlayer().AddItem(Gold001, 1)

If that works, then it is the assignment of your reward amount that is incorrect syntax ...




Edit: Actually, Game.GetPlayer().AddItem(Gold001) always adds 1 to gold ...
User avatar
Sun of Sammy
 
Posts: 3442
Joined: Mon Oct 22, 2007 3:38 pm

Post » Mon Jun 18, 2012 8:02 am

Try making it a bit simpler, just to see if it works. Instead of assigning your reward amount to a variable (which I think you may be doing wrong) just put an amount in the give command:




Game.GetPlayer().AddItem(Gold001, 1)

If that works, then it is the assignment of your reward amount that is incorrect syntax ...




Edit: Actually, Game.GetPlayer().AddItem(Gold001) always adds 1 to gold ...



I've forgot to say that i already tried that, thanks anyway. With amount or without amount. The error isnt in the script im sure.
User avatar
Brιonα Renae
 
Posts: 3430
Joined: Mon Oct 22, 2007 3:10 am

Post » Mon Jun 18, 2012 6:54 am

Problem solved. It was much easier as i thought.
User avatar
Crystal Birch
 
Posts: 3416
Joined: Sat Mar 03, 2007 3:34 pm


Return to V - Skyrim