Comments (5)
Ah and here's the full error.
Uncaught TypeError: argList.shift is not a function at Object.callobj (projectorrays.js:87) at Bytecode.translate (projectorrays.js:87) at Handler.translate (projectorrays.js:67) at LingoScript.translate (projectorrays.js:50) at OpenShockwaveMovie.linkScripts (projectorrays.js:16) at FileReader.reader.onload.e (projectorrays.js:13) callobj @ projectorrays.js:87 Bytecode.translate @ projectorrays.js:87 Handler.translate @ projectorrays.js:67 LingoScript.translate @ projectorrays.js:50 OpenShockwaveMovie.linkScripts @ projectorrays.js:16 reader.onload.e @ projectorrays.js:13 FileReader (async) OpenShockwaveMovie.readFile @ projectorrays.js:13 OpenShockwaveMovie @ projectorrays.js:12 createNewOpenShockwaveMovie @ projectorrays.js:93 onclick @ left.htm:15
from openshockwave.
idk why we never replied to this @hqkirkland
idr if we discussed it on the discord server or not, but i'll bring it up!
sry for the not most particularly swift of replies...
that is a strange bug...
I honestly have no idea what's going there
as for the debugging of javascript, there's no proper way
you have to use the web console and hope that it displays something meaningful
console.log(obj.supposedMethod);
function(stuff){code;}
that's what you hope
JS is also especially bad at dealing with null/undefined (although, tbh, I side with the guy who said they're a[n expensive] mistake)
For example, when starting to write a parser for PFR, I miss-typed "length" as "lenth", and JS was so kind as to not throw an error until I tried to use the value I had supposedly read. The actual source of the error was in the code that gets said value from the arraybuffer (said value is an ascii string).
so, here's what happened:
- a for loop had an incorrect variable name, but 'worked' cuz NaN
- a function returned null
- a DOM manipulation failed because the value it was adding to the element was null
- execution halted
- an error was thrown
So, this logical program flow caused me quite a hassle tracking down the exact bug. While this is possible in any language, JS is especially notorious for it, and that happens even in strict mode. (speaking of which, i should enable)
anyways, I'll mention this [again???] on the discord server
from openshockwave.
isn't this just because the argslist is empty?
from openshockwave.
Well thanks for the response! I haven't been able to use this since decommissioning my home server, but I may put it on a workstation my co. bought me.
from openshockwave.
some quick messing around in the JS console:
var test = []
undefined
test.shift()
undefined
var test2 = null;
undefined
test2.shift()
TypeError: test2 is null
var test3 = new Uint8Array(16)
undefined
test3.shift()
TypeError: test3.shift is not a function
empty array still has shift()
null is null, does nothing
a typed array does NOT have shift()
But, I still don't know what's going on here...
from openshockwave.
Related Issues (12)
- Communication HOT 14
- Thank you! HOT 18
- The mystery of strings HOT 41
- lscrtoscript broken after last merge ? HOT 21
- Question not really issue. HOT 8
- Is it possible to get where the scripts exactly come from ? HOT 2
- Re-Location HOT 3
- Unable to open up any dcr HOT 42
- DCR DEFLATE Compression HOT 15
- 8-bit BITD issues HOT 45
- MCsL / cast lists HOT 33
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openshockwave.