problem to store the armor rating of an object in a variable

Post » Mon May 04, 2015 12:37 pm

Hello everyone! this is my first post

Well... I have a problem with a mod that I am creating..the idea is create a script to get the armor rating of an object that receives the script and store in a variable.

After recalculate automatically the armor rating with a variable based on events occurring.

For example, the elven boots receive the script then the script obtains armor rating and store in the variable

if the daedric armor receive the script then the script obtains its armor rating...

I'm using this function: http://www.creationkit.com/GetArmorRating_-_Armor

I use it in this way:

int armorR = GetAR()

but not compile... any help??

User avatar
Siobhan Thompson
 
Posts: 3443
Joined: Sun Nov 12, 2006 10:40 am

Post » Mon May 04, 2015 5:54 am

What sort of error message are you getting?

User avatar
Roisan Sweeney
 
Posts: 3462
Joined: Sun Aug 13, 2006 8:28 pm

Post » Mon May 04, 2015 5:25 pm

Hey, thanks for the attention!

C:\Program Files\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\estado.psc(4,11): no viable alternative at input 'GetAR'
C:\Program Files\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\estado.psc(4,16): required (...)+ loop did not match anything at input '('
C:\Program Files\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\estado.psc(4,4): Unknown user flag GetAR
No output generated for estado, compilation failed.
this is the mistake..
I think I should specify where points function.. but... How do I make reference to the object that receivs the script?
User avatar
Lizzie
 
Posts: 3476
Joined: Sun Nov 19, 2006 5:51 am

Post » Mon May 04, 2015 4:49 pm

My knowledge of Papyrus is fairly limited, but is your call to getAR() inside a valid codeblock? As far I understand you need to have your code inside events or functions which will trigger, and the only way I could reproduce the above errors was placing such a call outside of where it would be expected.

User avatar
Krystal Wilson
 
Posts: 3450
Joined: Wed Jan 17, 2007 9:40 am

Post » Mon May 04, 2015 5:24 pm

Thanks for the reply ;D

But.. I dont understand you, I dont want to take the value of armor rating if an event occurs, I just want to store the armor rating of the object in a variable

Example.. variable ArmorRa = which returns the method Getar ()

(I started yesterday with papyrus, sorry)

I think the method needs point where get the armor rating... Something like ...

ArmorRA = methodReturn_ID_object_itself ().GetAR()

but I can not find a function like this.... Is only a idea.. because in the example of the funciont GetAR()..

int AR = Bob.GetEquippedShield().GetAR() First it aims to bob, after he points to shield of bob, after pointed to a shield, the funcion can obtain the rating...

User avatar
Sammi Jones
 
Posts: 3407
Joined: Thu Nov 23, 2006 7:59 am

Post » Mon May 04, 2015 7:36 am

That is a SKSE function. Are you compiling in the CK with SKSE loaded?

User avatar
Romy Welsch
 
Posts: 3329
Joined: Wed Apr 25, 2007 10:36 pm

Post » Mon May 04, 2015 9:01 am

I Know, I have installed skse, I start Skyrim with skse loader skyrim

but exist a skse loaded for creation KIT??? omg..
How I can compile with skse_loader?
User avatar
Allison C
 
Posts: 3369
Joined: Mon Dec 18, 2006 11:02 am

Post » Mon May 04, 2015 2:16 pm

Pretty sure you don't have to do anything apart from make sure you have the SKSE script source files, as per point three of the SKSE readme

User avatar
Amelia Pritchard
 
Posts: 3445
Joined: Mon Jul 24, 2006 2:40 am


Return to V - Skyrim