problem saving

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
pascalh4
Posts: 81
Joined: Thu Aug 22, 2013 12:50 pm

problem saving

Post by pascalh4 » Sun Sep 29, 2013 2:04 pm

Hello everyone.

Always a small problem recognition.
The solution found in the topic "not same as standalone editor" (show. ..) creates a problem with the backup.

My script works fine in the editor, but after the "save" command, I have an error message:

Type: Chunk: can not find stack
Object: Next
Line: show stack ("F" & tNum & "" & Nvar)
Hint: mouseUp

Is that after saving the variable is no longer recognized?

code concerned.

Code: Select all

global tNum,Nvar


on mouseUp
   hide this stack
   add 1 to tNum
   go to stack ("F" & tNum & "  " & Nvar)
   show stack ("F" & tNum & "  " & Nvar)
      
   If there is  not a stack ("F" & tNum + 1 & "  " & Nvar) of stack ("F0" & "  " & Nvar)  then
      hide button 2
end if
end mouseUp
Pascal

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: problem saving

Post by bangkok » Sun Sep 29, 2013 6:32 pm

-After saving/closing your script : yes the global variables stay in memory

-but have you checked : do you have any real value in the variable Nvar ?

-furthermore why do you put 2 space after tNum ?

-my advise : trust the engine... You have a problem with the name of your stack (real name) and the name you create in your script. :)

pascalh4
Posts: 81
Joined: Thu Aug 22, 2013 12:50 pm

Re: problem saving

Post by pascalh4 » Sun Sep 29, 2013 10:47 pm

Hi Bangkok
-but have you checked : do you have any real value in the variable Nvar ?
I think yes, it's an answer text
-furthermore why do you put 2 space after tNum ?
There is just for a space between the two variables. (for ease of reading the name of stack)
- You have a problem with the name of your stack (real name) and the name you create in your script.
The real name is like that: ex. "F1 text" with F=constant, 1=tNum, " "= space, text=Nvar.

Isn't that correct?

Pascal

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: problem saving

Post by bangkok » Mon Sep 30, 2013 7:22 am

pascalh4 wrote:
-furthermore why do you put 2 space after tNum ?
There is just for a space between the two variables. (for ease of reading the name of stack)
As I said, you put 2 space in your script, not 1. And you seem to speak about only 1 space. So that could make the difference, explaining why LC can't find the stack.

Furthermore, just to be sure about the content of nVar and tNum,

at the begining of the script, put :

Code: Select all

answer nVar
answer tNum
and comment the line that creates problem :

Code: Select all

--show stack ("F" & tNum & "  " & Nvar)
and run the script.

pascalh4
Posts: 81
Joined: Thu Aug 22, 2013 12:50 pm

Re: problem saving

Post by pascalh4 » Tue Oct 01, 2013 11:04 am

Hi Bangkok
at the begining of the script, put :
CODE: SELECT ALL
answer nVar
answer tNum


and comment the line that creates problem :
CODE: SELECT ALL
--show stack ("F" & tNum & " " & Nvar)


and run the script.
Sorry, but I can't use this method. I don't know if I do this correctly

By cons, it is true, the problem is the name of the stack. I tried only with "F & tNum" and it works perfectly.

I'll try to refine to see if the problem comes from "Nvar" or double space,.. or other.
As I said, you put 2 space in your script, not 1.
The 2 spaces are only there for many visually differentiate the two groups of words of the title. But if it is not correct, how else to create a large space between the two groups.

After another test, apparently, is the variable "nVar" problematic. Keeping spaces and replacing Varialble by a constant element, everything works.

Now I need to find out why.
This variable is an answer to a "ask" request and becomes the title of my stack.

variable is placed in GLOBAL in all my script and it is not writing error.

Where could I commit my mistake?


Pascal

Post Reply