Script error

100 views
Skip to first unread message

greg

unread,
Feb 23, 2022, 5:55:50 AM2/23/22
to mementodatabase
Hello.
Can someone help me with the error in the attachment.
I can't find the error.
ScriptPreisanpassung.png

Thanks.
Greg

Rob L

unread,
Feb 23, 2022, 6:25:18 AM2/23/22
to mementodatabase
Well you have one too many closing brackets for a start, which is what the error is triggered by.
I'm not sure about the calculation though - surely Einkaufspreis Netto divided by itself will always just be 1? I presume one of the brackets is also in the wrong place.

Bill Crews

unread,
Feb 23, 2022, 7:30:08 AM2/23/22
to Rob L, mementodatabase
[Friendly discussion upcoming. Let's enjoy our beers. šŸ™ƒ]

I guess it's just me, but there are (parentheses), [brackets], & {braces}.

I know some like to say [square brackets] & {curly brackets}, but to me, that's redundantĀ in the 1st case & wrong & misleading, in the 2nd case. (Parenthetically... See? Underscoring can also be a form of grouping, but not in source code.) JavaScript array subscripts go in [brackets]. I'm not sure if they apply in JavaScript or not, but there are also <angle brackets>. I've seen someone call a brace a bracket, but why one would call a parenthesis a bracket is beyond me; I've never seen anyone do that before. Ask any schoolkid what ( is.

[So, did we enjoy ourselves? 😁]

So, you're right about the count of parentheses. These "Missing ;" errors are among the hardest for me to scope out. I don't know a general rule for them. It seems to mean that the parser (part of the JavaScript interpreter) became confused somehow -- often not clearly how.

So I just check out basic structural syntax and play around with it until something clears the air -- in my experience, without my ever finding out what had been wrong & what fixed it & why it fixed it. If anyone can clarify any of this, I would be deliriously happy. I've read at StackOverflow many times about it, and I still don't get it.

--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/29ffc69e-b920-4a06-8103-98fbc2c7680en%40googlegroups.com.

Rob L

unread,
Feb 23, 2022, 7:38:10 AM2/23/22
to mementodatabase
The use of the term "parenthesis/es" is specific to the US. In the rest of the English speaking world, the terms are bracket for "()", square bracket for "[]" and curly bracket for "{}"

greg

unread,
Feb 23, 2022, 7:57:23 AM2/23/22
to mementodatabase
In spite of all - Now it run“s

Thanks!

Bill Crews

unread,
Feb 23, 2022, 8:31:12 AM2/23/22
to greg, mementodatabase
I bet you don't know what made it start to run. What was the last edit you did before it started to run?

greg

unread,
Feb 24, 2022, 3:29:05 AM2/24/22
to mementodatabase
The error was in the brackets :). AtĀ  first I deleted all unnecessary brackets and gradually reinserted them.

Er Mo

unread,
Feb 24, 2022, 4:56:19 AM2/24/22
to mementodatabase
Hallo
Ich würde die Einzelnen Felder zuerst in Variable verpacken und dan mit diesen Rechnen . So brauche ich nicht mehrmals auf ein Feld zugreifen , spart Zeit  . Ist aber bei deinen Umfang vom Skript nicht wirklich ausschlaggebend
Bs : komme aus Ɩsterreich

Hello
I would first pack the individual fields in variables and then calculate with them. This way I don't need to access a field several times, which saves time. Is not really decisive with your scope of the script
Bs: come from Austria

Ernst

greg

unread,
Feb 24, 2022, 8:42:55 AM2/24/22
to mementodatabase
Hallo Ernst.
Danke für den Hinweis. Weil es nur so kurzer Code war hab ich darauf verzichtet.
Was mich eher stört, ist die lange Ladezeit von großen Sammlungen.
Hast du dazu OptimierungsvorschlƤge?
PS: Komme auch aus Ɩsterreich
Greg
Reply all
Reply to author
Forward
0 new messages