Very simple papyrus script don't work

Post » Mon Jun 18, 2012 9:49 pm

Hi

I write for test a first script something very simple and attached it to a weapon

Scriptname test extends ObjectReference

Event OnEquipped(Actor akActor)

Debug.Trace("We were equipped by the player!")

endEvent

Normaly, if i equip my weapon, i must see message "We were equipped by the player!"
but nothing happen
User avatar
Alexander Lee
 
Posts: 3481
Joined: Sun Nov 04, 2007 9:30 pm

Post » Mon Jun 18, 2012 7:43 pm

Try using Debug.MessageBox() or Debug.Notification()
Debug.Trace() writes output to some file and you have to enable something in the INI first for it to do that
User avatar
saxon
 
Posts: 3376
Joined: Wed Sep 19, 2007 2:45 am

Post » Mon Jun 18, 2012 3:16 pm

I prefer Debug.Notification() to Debug.MessageBox() since you don't have to click "OK" to make it go away...however, MessageBox can display more text than Notification, so it's a tradeoff.
User avatar
JeSsy ArEllano
 
Posts: 3369
Joined: Fri Oct 20, 2006 10:51 am

Post » Mon Jun 18, 2012 8:56 pm

Try this:
Scriptname test extends ObjectReferenceEvent OnEquipped(Actor akActor)	 If akActor == Game.GetPlayer()		   Debug.MessageBox("We were equipped by the player!")	 EndifendEvent

By the way, Debug.Trace doesn't show up in game. Your current script would write that to the console. Debug.MessageBox brings up a box on your screen that pauses the game. Debug.Notification makes a little message in the top left.
User avatar
Wane Peters
 
Posts: 3359
Joined: Tue Jul 31, 2007 9:34 pm

Post » Mon Jun 18, 2012 6:19 pm

I don't understand why it's not working

I trying adding
Game.GetPlayer().PlaceAtMe(Game.GetForm(0x00023ab1))

To place a mob at my position

And i trying to change event by onhit
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \
bool abBashAttack, bool abHitBlocked)

Nothing happen when i attack

I use the good weapon file, stats modification work
User avatar
celebrity
 
Posts: 3522
Joined: Mon Jul 02, 2007 12:53 pm

Post » Mon Jun 18, 2012 8:50 pm

I don't understand why it's not working

I trying adding
Game.GetPlayer().PlaceAtMe(Game.GetForm(0x00023ab1))

To place a mob at my position

And i trying to change event by onhit
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \
bool abBashAttack, bool abHitBlocked)

Nothing happen when i attack

I use the good weapon file, stats modification work

Did the script before work?

And explain more what your trying to do in this script.
User avatar
LittleMiss
 
Posts: 3412
Joined: Wed Nov 29, 2006 6:22 am

Post » Mon Jun 18, 2012 7:56 pm

It's my first scrpt i just trying doing something simple when i equip a weapon

I trying your script but i have a compialtion fail
User avatar
Dawn Porter
 
Posts: 3449
Joined: Sun Jun 18, 2006 11:17 am

Post » Tue Jun 19, 2012 6:41 am

It's my first scrpt i just trying doing something simple when i equip a weapon

I trying your script but i have a compialtion fail

Whats the compilation fail saying? Post it.
User avatar
Darian Ennels
 
Posts: 3406
Joined: Mon Aug 20, 2007 2:00 pm

Post » Mon Jun 18, 2012 7:13 pm

Starting 1 compile threads for 1 files...
Compiling "test"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\test.psc(3,0): missing EOF at 'Scriptname'
No output generated for test, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on test
User avatar
Naazhe Perezz
 
Posts: 3393
Joined: Sat Aug 19, 2006 6:14 am

Post » Tue Jun 19, 2012 3:50 am

Starting 1 compile threads for 1 files...
Compiling "test"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\test.psc(3,0): missing EOF at 'Scriptname'
No output generated for test, compilation failed.

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

I just put my script in, and it compiles perfectly. What is your script running on, is there any info you're leaving out?
User avatar
anna ley
 
Posts: 3382
Joined: Fri Jul 07, 2006 2:04 am

Post » Mon Jun 18, 2012 10:53 pm

yes i forget to remove the first line "Scriptname test extends ObjectReference"

But in game nothing happen, have you try your script ingame?
User avatar
Rachael
 
Posts: 3412
Joined: Sat Feb 17, 2007 2:10 pm

Post » Tue Jun 19, 2012 3:24 am

Try following this.
http://www.creationkit.com/Bethesda_Tutorial_Papyrus_Hello_World

IT may give you a better understanding of how the scripting system works.
User avatar
sharon
 
Posts: 3449
Joined: Wed Nov 22, 2006 4:59 am

Post » Mon Jun 18, 2012 9:12 pm

I already did it
for that i don't understand why when i attach a script to a weapon it didn't work
User avatar
m Gardner
 
Posts: 3510
Joined: Sun Jun 03, 2007 8:08 pm

Post » Mon Jun 18, 2012 5:24 pm

yes i forget to remove the first line "Scriptname test extends ObjectReference"

But in game nothing happen, have you try your script ingame?

I just tried it in game. Your doing something wrong.
User avatar
Kate Schofield
 
Posts: 3556
Joined: Mon Sep 18, 2006 11:58 am

Post » Tue Jun 19, 2012 5:23 am

I don't see what is wrong :/

i attach my script to deadric waraxe weapon, i compile i save, i save all and lauch the game
User avatar
steve brewin
 
Posts: 3411
Joined: Thu Jun 21, 2007 7:17 am

Post » Mon Jun 18, 2012 6:55 pm

Well if you want, you can get Teamviewer 7 (http://teamviewer.com), and PM your ID so I can help you.

I don't see what is wrong :/

i attach my script to deadric waraxe weapon, i compile i save, i save all and lauch the game
User avatar
Sasha Brown
 
Posts: 3426
Joined: Sat Jan 20, 2007 4:46 pm

Post » Mon Jun 18, 2012 7:27 pm

let's see that tommorow

My internet connection is very slow at the moment and i will going to bed
User avatar
x a million...
 
Posts: 3464
Joined: Tue Jun 13, 2006 2:59 pm

Post » Mon Jun 18, 2012 4:14 pm

let's see that tommorow

My internet connection is very slow at the moment and i will going to bed

Alright.
User avatar
Scared humanity
 
Posts: 3470
Joined: Tue Oct 16, 2007 3:41 am

Post » Mon Jun 18, 2012 7:34 pm

Hum finaly I understand

My axe i use is a legendary waraxe and script work only on standar axe

But how making script work on modify weapon?
User avatar
Dina Boudreau
 
Posts: 3410
Joined: Thu Jan 04, 2007 10:59 pm

Post » Mon Jun 18, 2012 9:18 pm

Hum finaly I understand

My axe i use is a legendary waraxe and script work only on standar axe

But how making script work on modify weapon?

Not so sure about that... Sorry.
User avatar
Joanne
 
Posts: 3357
Joined: Fri Oct 27, 2006 1:25 pm


Return to V - Skyrim