Jump to content

One Little tiny Problem with scripting


silvereden2

Recommended Posts

Hey I was wondering If anyone could give me pointers/tips on how to work this thing

http://imageshack.us/a/img856/1207/npcscript.jpg

I followed the guide very closely and i typed everything word for word (including spaces) but the script doesn't seem to want to save. if i can get the thing to save i can actually progress and finish up my custom companion Help/advice would be appreciated. I understand what the *** stands for its what I put my custom companions quest ID ect, but i don't know if thats causing the problem.

Edited by silvereden2
Link to comment
Share on other sites

Well, you probably won't be able to save the script until you replace the *** with your custom companions quest ID.

I've done that and still no save I may be doing something wrong with the name probably.

Link to comment
Share on other sites

You don't have all your variables defined.

IsFollowingLong, combatstyleranged, etc.

 

get geck power up to display script syntax errors.

 

*face palm* I was supposed to put isfollowingLong variable like for example "isfollowingLong 1 and or 0" wow I feel so stupid right now. -__-

Link to comment
Share on other sites

You don't have all your variables defined.

IsFollowingLong, combatstyleranged, etc.

 

get geck power up to display script syntax errors.

 

this is how I typed it out

--------------------------------------------------------

 

scnMycompanionNisascript

 

short HasBeenHired

short L38

short Relax

short DoOnce

 

int CombatStyleRanged 1

int CombatStyleMelee 0

int IsFollowingDefault 0

int IsFollowingLong 0

int FollowerSwitchAggressive 0

int Waiting 0

 

Begin GameMode

If (DoOnce !=1)

Set HasBeenHired to 0

Set L38 to 0

Set CombatStyleRanged to 1

Set CombatStyleMelee to 0

Set IsFollowing Default to 0

Set FollowingLong to 0

Set FollowerSwitchAggressive to 0

Set Waiting to 0

Set Relax to 0

Set DoOnce to 1

Endif

End

-------------------------------------------------------------------------

Am I still doing something wrong?

Link to comment
Share on other sites

Try Cipscis's Script Validator if you have not been able to get the GECK Power Up to work. You will see that you have multiple variable names per declaration, a space in 'Set IsFollowing Default to 0", and oddly enough the validator did not catch this one and should have noted it as undeclared - "Set FollowingLong to 0" is spelled incorrectly.

Thank you so much!! It finally saved after i removed the "SetFollowingLong to 0" Line. now i can finally finish and develop my mod.

Link to comment
Share on other sites

Try Cipscis's Script Validator if you have not been able to get the GECK Power Up to work. You will see that you have multiple variable names per declaration, a space in 'Set IsFollowing Default to 0", and oddly enough the validator did not catch this one and should have noted it as undeclared - "Set FollowingLong to 0" is spelled incorrectly.

Thank you so much!! It finally saved after i removed the "SetFollowingLong to 0" Line. now i can finally finish and develop my mod.

 

deleted

Edited by DizzasterJuice
Link to comment
Share on other sites

You do NOT set the variable up top when you are declaring the variable.

 

Meaning:

scnMycompanionNisascript <-----------------should be a space between scn and the script name
scn MycompanionNisascript <----------------correct


int IsFollowingLong <------------------do not set the variable here. This is ONLY to DECLARE the variable. The  variable will be set after the BEGIN.
int IsFollowingDefault

If you declare a variable within the BEGIN block it will be reset every frame the script is run 

Edited by Capt Mitch
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...