Jump to content

Scripting Problems


FalloutParker

Recommended Posts

I am trying to make a very simple script that upon completion of the very first quest it displays a message that says thanks for installing my mod. I have my message set but the script is not saving correctly is says "save current script? current = "

 

this is my script

 

scn 000001ThanksForInstalling1
set shown
begin gamemode
If GetQuestCompleted VCG01 ==1
if [shown ==0]
showmessage 000001ThanksForInstalling
set shown to 1
endif
endif
end
What the problem??? The message id is correct so I dont know
Link to comment
Share on other sites

I think the thing after the name should either be "int shown" or "short shown". You could try with that. Also, the GECK doesn't like scripts starting with numbers so you should really consider renaming it to something like "aaa" or "zzz". :)

Link to comment
Share on other sites

1) set is not a valid variable type. Use a short since the scripting language doesn't support boolean values.

 

2) I don't believe square brackets in a condition is valid. You can use parantheses or you can leave them out so it looks like this: if shown == 0.

 

3) Not an error, but == 1 is redundant in your first condition, GetQuestCompleted VCG01 is sufficient as it will evaluate to either true (1) or false (0).

 

4) Be careful with using numbers as prefixes. It works for base objects like you're doing here, but if you name a reference like that your script will not compile.

 

5) If your script is not supposed to be doing anything else, then shutdown the quest instead of using a control variable. StopQuest ThanksForInstalling for example.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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