Script : expecting RPAREN

Post » Wed Jun 20, 2012 1:30 am

Hey guys !
I'm a beginner with the Creation Kit, and I decided to create an easier way for people who wants to reset their perks.
So I just started the script, ( a lot of things are missing for the result, but I will do it when I will resolve my problem ).
Here it is :
Scriptname APResetPerk extends ObjectReference{Script for reseting perk}Message Property APResetPerkAsk AutoMessage Property APResetPerkEnd AutoEvent OnRead()Int buttonSelectedbuttonSelected = APResetPerkAsk.Show()If (buttonSelected == 0)  ;=====================================  ;============ALTERATION===============  Game.GetPlayer().RemovePerk(000f2ca6);Novice Alteration  Game.GetPlayer().RemovePerk(000153cd);Alteration Dual Casting  Game.GetPlayer().RemovePerk(000c44b7);Apprentice Alteration  Game.GetPlayer().RemovePerk(00053128);Magic Resistance 1  ;Game.GetPlayer().RemovePerk(00053129);Magic Resistance 2  ;Game.GetPlayer().RemovePerk(0005312a);Magic Resistance 3  Game.GetPlayer().RemovePerk(000c44b8);Adept Alteration  Game.GetPlayer().RemovePerk(000c44b9);Expert Alteration  Game.GetPlayer().RemovePerk(000581f7);Atronach  Game.GetPlayer().RemovePerk(000c44ba);Master Alteration  Game.GetPlayer().RemovePerk(000581fc);Stability  Game.GetPlayer().RemovePerk(000d7999);Mage Armor 1  ;Game.GetPlayer().RemovePerk(000d799a);Mage Armor 2  ;Game.GetPlayer().RemovePerk(000d799b);Mage Armor 3[...]else  APResetPerkEnd.Show()EndIfEndEvent
As you can see, I didn't show you all the script ( too long ) and there are some missing commands after all the RemovePerk, but I will do it later.

And now, here's my problem :

Starting 1 compile threads for 1 files...
Compiling "APResetPerk"...
c:\[...]\Scripts\Source\temp\APResetPerk.psc(14,33): extraneous input 'f2ca6' expecting RPAREN
c:\[...]\Scripts\Source\temp\APResetPerk.psc(15,36): extraneous input 'cd' expecting RPAREN
c:\[...]\Scripts\Source\temp\APResetPerk.psc(16,33): extraneous input 'c44b7' expecting RPAREN
c:\[...]\Scripts\Source\temp\APResetPerk.psc(20,33): extraneous input 'c44b8' expecting RPAREN
c:\[...]\Scripts\Source\temp\APResetPerk.psc(21,33): extraneous input 'c44b9' expecting RPAREN
c:\[...]\Scripts\Source\temp\APResetPerk.psc(22,36): extraneous input 'f7' expecting RPAREN
c:\[...]\Scripts\Source\temp\APResetPerk.psc(23,33): extraneous input 'c44ba' expecting RPAREN
c:\[...]\Scripts\Source\temp\APResetPerk.psc(24,36): extraneous input 'fc' expecting RPAREN
c:\[...]\Scripts\Source\temp\APResetPerk.psc(25,33): extraneous input 'd7999' expecting RPAREN
[...]

No output generated for APResetPerk, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on APResetPerk

So I searched on this nice forum and I found that " expecting RPAREN " means " ecpecting ')' ". But I tried to put some ")" ( which is really stupid because it cuts the ID of the perk so ... ) and I didn't find any issue. By the way, it's why I created a New Topic here.

Help please ! =)


Xarkes

PS: Sorry for my bad english, I hope you understood everything !
User avatar
NAkeshIa BENNETT
 
Posts: 3519
Joined: Fri Jun 16, 2006 12:23 pm

Post » Wed Jun 20, 2012 5:33 am

you need to declare your perks as perk properties, not use their form IDs
User avatar
Chase McAbee
 
Posts: 3315
Joined: Sat Sep 08, 2007 5:59 am

Post » Tue Jun 19, 2012 2:46 pm

You cannot use the reference id inside a script. Easiest way would be to have a property for each perk, or create a form list with all of them and go across it.

Once you have removed all perks, how do you give the player the "points" to spend them back? I looked around some time ago but failed to find a way to do so.
User avatar
Bonnie Clyde
 
Posts: 3409
Joined: Thu Jun 22, 2006 10:02 pm

Post » Wed Jun 20, 2012 4:19 am

Instead of using the Editor IDs, you need to create a perk property for each perk, and use those properties instead. As for why it's giving you errors with the right parentheses, I'm not sure. Maybe the compiler accepts the 0's at the beginning of the IDs as a null property and so the following digits didn't conform to expectations.
User avatar
Miss K
 
Posts: 3458
Joined: Sat Jan 20, 2007 2:33 pm

Post » Tue Jun 19, 2012 8:45 pm

Okay so I have to do a property for each perk ?
Something like
Perk Property 000f2ca6 Auto
Or ... ?

Once you have removed all perks, how do you give the player the "points" to spend them back? I looked around some time ago but failed to find a way to do so.
Well I didn't think to that at the moment, maybe I'll use a command which give "free points" as if the player leveled up. If you see what I mean. ( If it is possible )
User avatar
Skivs
 
Posts: 3550
Joined: Sat Dec 01, 2007 10:06 pm

Post » Tue Jun 19, 2012 7:35 pm

Perk Property NoviceAlteration00 auto

If you don't name the properties exactly the same as the name of the perks, then you can't choose auto-fill when setting your properties later, which makes it a real hassle when you have a lot.
User avatar
Rebecca Clare Smith
 
Posts: 3508
Joined: Fri Aug 04, 2006 4:13 pm

Post » Tue Jun 19, 2012 5:35 pm

Perk Property AssassinsBlade auto

then in the properties window, you select the AssassinsBlade perk to fill the property value
User avatar
Blessed DIVA
 
Posts: 3408
Joined: Thu Jul 13, 2006 12:09 am

Post » Tue Jun 19, 2012 7:51 pm

So If I'm not totally stupid :
Scriptname APResetPerk extends ObjectReference {Script for reseting perk}Message Property APResetPerkAsk AutoMessage Property APResetPerkEnd AutoPerk Property NoviceAlteration00 autoEvent OnRead()Int buttonSelectedbuttonSelected = APResetPerkAsk.Show()If (buttonSelected == 0)  ;=====================================  ;============ALTERATION===============  Game.GetPlayer().RemovePerk(NoviceAlteration00)       endIfEndEvent

I compiled it, no errors so it seems good !
User avatar
TASTY TRACY
 
Posts: 3282
Joined: Thu Jun 22, 2006 7:11 pm

Post » Wed Jun 20, 2012 3:01 am

just make sure NoviceAlteration00 is actually pointing to the perk in the properties editor. the script will compile with or without this hook-up (without the hook-up, it will do nothing in game)
User avatar
Max Van Morrison
 
Posts: 3503
Joined: Sat Jul 07, 2007 4:48 pm

Post » Tue Jun 19, 2012 11:53 pm

Yep, I checked it is the good name.
Thank's for help, I'm writing the next part of the script and I will say you for any others problems. ( Or not, which could be very cool, but I don't think so )
User avatar
Skivs
 
Posts: 3550
Joined: Sat Dec 01, 2007 10:06 pm

Post » Tue Jun 19, 2012 2:03 pm

Hey,

I finished the first part of the script ( Removing all the perks ) I didn't check but it should work.
Now my problem is, that I though by forcing level up, it would give a "free point" to put in perk ( like when you level up normally ). But I tried, and I was wrong, so if someone has an idea to give some points to the player, tell me ! It has to take care of not used points, and of the level of the character.

Thank's for help.
User avatar
Your Mum
 
Posts: 3434
Joined: Sun Jun 25, 2006 6:23 pm


Return to V - Skyrim