I wanted to use Puppeteer to get sports scores from a page and put them in a variable. I then wanted to use that variable to display updates for the scores in a popup.
Hi everyone
I am using Visual Studio Code with Node.js 18.17.1. I installed Puppeteer 22.5.0 with the following command:
Npm install browserify -g
I tried creating a bundle with the following command:
Browserify index.js -o bundle.js
This error message came up:
Error: Can't walk...
The console says
index.js:2 Uncaught ReferenceError: require is not defined
at index.js:2:19
(anonymous) @ index.js:2
The code that it refers to is
const puppeteer = require("puppeteer")
This is the part in sources that is underlined
I think flow might not be an issue here. My js...
Hi everyone
I'm using Visual Studio Code and would like to use a variable from a JavaScript file in my html code.
This is easy enough to do until I try using Puppeteer in the JS file. If I add the following line to the JS code, I can no longer call my JS variable in the html file.
const...
Turns out it was a problem with package.json (thing mentioned in line 3)
The first step in installation was to type "npm init". At the final step, it asked "Is this ok? (yes)". I was supposed to just hit enter, but I typed "y" then hit enter, which messed it up. This is why it later...
Hi everyone
I've just started using Visual Studio Code and tried to install Cheerio using the "npm i cheerio" command. It gives me the following error messages.
npm ERR! code EJSONPARSE
npm ERR! path C:\Users\donbi\Downloads\scraper/package.json
npm ERR! JSON.parse Unexpected token 'p'...
The files shows up and can be loaded and deleted within the Android app. I can also find it on my PC and open it as a text file when I run the app within Godot.
What I can't do is plug my phone into the PC and find the file on my phone in a directory.
Hi everyone
My program saves files to user://. I'd like to find these files on my phone and copy them to another phone. Is it possible?
I used
ProjectSettings.globalize_path("user://")
to show where the file saved and got
/data/org.godotengine.[APP_NAME]/files/
However, when I went to...
That's what I did. I didn't know I had to manually update Global.dict whenever I changed Global.arrayA (or arrayB).
Now, I'm surprised it worked at all.
I think it makes sense why lines 2 and 3 fix the problem now.
Hi everyone
I'm making a game for memorising pairs of things entered by the user (e.g. countries and their capitals).
If we're using countries and capitals, I'll store countries as an array in Globals.arrayA. Capitals get stored as Globals.arrayB.
The two arrays are stored in globals as...
Hi everyone
So far as I can tell, there is no function to automatically shrink text to fit on one line within a label in Godot 4. Instead, I'm going to get the length of each string with
len(string)
and use
Label.set("theme_override_font_sizes/font_size", size)
to adjust the size according...
I ended up fixing it, although I can't remember exactly how. I think I just needed to change one line in the xml file. I've been using only Godot for a few months, so I forgot a lot of what I used to do with Android Studio.
Hi everyone
I've saved two arrays into a JSON file.
This was the code I used:
func save():
var file = FileAccess.open("user://savedarrays.json", FileAccess.WRITE)
var file_path = "user://saved_arrays.json"
var data = {
"arrayA": Global.arrayA,
"arrayB"...