Author Topic: Script Issues  (Read 1668 times)

SomeRandomCreator

  • Doctor
  • ***
  • Posts: 64
  • Internal scripting and flags are my mortal enemies
    • View Profile
Script Issues
« on: July 24, 2016, 06:00:03 pm »
Does anyone have the problem where when working on scripts, you exit the script and go back in, some data is lost? >:(

CreepiX

  • Guest
Re: Script Issues
« Reply #1 on: July 24, 2016, 06:02:07 pm »
More details please?

SomeRandomCreator

  • Doctor
  • ***
  • Posts: 64
  • Internal scripting and flags are my mortal enemies
    • View Profile
Re: Script Issues
« Reply #2 on: July 24, 2016, 06:07:14 pm »
More details please?
Sure, okay so here's how it would look:
say(2)
I don't know what happened.
Uh-oh.
say(3)
Well, this is a problem, a very big one indeed.
I think I need a break.
Maybe even a vacation.

The last three lines would be erased as soon as I exit.

If you need the actual script line, I'll post it, in case it's relevant.
Also, the script name is "entry20"

LafondaSaysMeow

  • Captain
  • *****
  • Posts: 375
  • woah im gone again?? who would've thought
    • View Profile
Re: Script Issues
« Reply #3 on: July 24, 2016, 06:44:50 pm »
Did you put the empty line after your script? Because the script editor is buggy like that!

SomeRandomCreator

  • Doctor
  • ***
  • Posts: 64
  • Internal scripting and flags are my mortal enemies
    • View Profile
Re: Script Issues
« Reply #4 on: July 24, 2016, 06:53:44 pm »
Nope, made sure to delete it, but I'm gonna check something...to see if I just made a mountain out if a molehill.

LafondaSaysMeow

  • Captain
  • *****
  • Posts: 375
  • woah im gone again?? who would've thought
    • View Profile
Re: Script Issues
« Reply #5 on: July 24, 2016, 06:57:00 pm »
Nope, made sure to delete it,
Actually, it is the other way around. Scripts might get deleted if there ISN'T an empty line at the end of the script.
« Last Edit: July 24, 2016, 07:03:54 pm by LafondaSaysMeow »

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2176
    • View Profile
    • The Open Level Project
Re: Script Issues
« Reply #6 on: July 24, 2016, 09:02:06 pm »
I've heard of the last line being deleted, but not three lines at once.

LafondaSaysMeow

  • Captain
  • *****
  • Posts: 375
  • woah im gone again?? who would've thought
    • View Profile
Re: Script Issues
« Reply #7 on: July 24, 2016, 10:11:40 pm »
it's happened to me before
i feel like the more you exit out of the editor the more lines that get deleted
i'm not sure tho

SomeRandomCreator

  • Doctor
  • ***
  • Posts: 64
  • Internal scripting and flags are my mortal enemies
    • View Profile
Re: Script Issues
« Reply #8 on: July 26, 2016, 12:56:26 am »
UPDATE!

Ok, so I was continuing my work, when in the script editor, it had the first three words from the line that was-
You know what? That's way too confusing to say, I'll just show you here:

Original Scripting [Name: Scripting]
say(1):
Why?
say(3):
You know what? I don't care. I JUST DON'T CARE!
WHY? YOU KNOW WHY? I KNOW WHY! I
KNOW, YOU KNOW, EVERYONE DOES.


Say this was my scripting, with the bolded being the said erased.
Today, I found a new script called:
You know what?
That's right, there was a new script named on the first three words of the said erased.
 I checked it, and it had all the erased scripting.
I think it's because my computer takes some time to save the scripting. (Not like real save, but like to take it all.)
So, because I was too fast to exit, the computer had just made another script and had put the loaded script.
I mean, that's just what I think...

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2176
    • View Profile
    • The Open Level Project
Re: Script Issues
« Reply #9 on: July 26, 2016, 01:44:13 am »
Putting a colon at the end of a line causes the script to be split... Because that is how script names work in the level file.

So writing say(x) without the colon should prevent further problems like this. I should actually make colons at ends of lines red or something in Ved, or add a warning message.