#programming

1 messages · Page 5 of 1

mighty rain
#

ye because the page returns html

#

er

molten depot
#

this is the code i used 2 months ago and it worked just fine

fetch(vtcAPI)
    .then((response) => response.json())
    .then((json) => {
        let driverCountRes = json.response;

        driverCount.innerHTML += `${driverCountRes.members_count}`
    });
#

but when i use this code now its just undefined

mighty rain
#

☝️

molten depot
#

how do i fix it then

mighty rain
#

rules were changed for the api iirc

molten depot
#

bruh ...

#

then how can i make use of the API in JavaScript if it keeps triggering the cloudflare captcha page??

mighty rain
#

messing around with the headers could help i think, because it works fine when fetching the api thru the terminal (for me)

molten depot
#

i literally have to use a proxy which automatically sets the headers and stuff

#

if TMP would finally release an library for javascript this would be much easier

summer gyro
#

I don’t think it gets caught with cors on axios but idk

molten depot
molten depot
#
const vtcAPI = 'PROXYLINK' + encodeURIComponent('https://api.truckersmp.com/v2/vtc/68863');
const membersAPI = 'PROXYLINK' + encodeURIComponent('https://api.truckersmp.com/v2/vtc/68863/members');
const eventsAPI = 'PROXYLINK' + encodeURIComponent('https://api.truckersmp.com/v2/vtc/68863/events');
const userAPI = 'PROXYLINK' + encodeURIComponent('https://api.truckersmp.com/v2/player/');

const driversArea = document.querySelector('.drivers-area');
const driverCount = document.querySelector('.driverCount');
const eventCount = document.querySelector('.eventCount');

fetch(vtcAPI)
    .then((response) => response.json())
    .then((json) => {
        let driverCountRes = json.response;

        driverCount.innerHTML += `<span data-purecounter-start="0" data-purecounter-end="${driverCountRes}" data-purecounter-duration="1" class="purecounter"></span>`
    });

full code im using

small crypt
#

It's scary, who would add 167 tables of data, this is ridiculous HaulieCry

shadow marsh
#

My topmost tables per DB was ~ 40.

paper hound
#

Am i the only one who uses mongodb? rof

mighty rain
#

i used to hate sql but now im in love with postgres

somber dragon
azure stratus
paper hound
#

I've only ever used mongo tbh, I guess it all comes down to use case and personal preference at the end of the day

#

I do love hbs tho Kek

shadow marsh
#

I'm more of the SQL / MariaDB guy acatjam

humble pewter
#

roblox game xd

#

roblox lua is same like python

summer gyro
humble pewter
#

print
if
for
while

#

it's similar

mighty rain
summer gyro
molten depot
#

i need an actual solution!!

molten depot
somber dragon
molten depot
#

i never worked with headers in an API request as i use proxy

somber dragon
molten depot
#

and how do i get the cf_clearance cookie

somber dragon
#

Dev tools > Network > pick any request > Cookies tab

molten depot
#

yeah still not working

molten depot
somber dragon
molten depot
#

im literally trying it on my localhost with my user agent + cookie from the tmp api

#

still giving me the undefined error

summer gyro
#

So in that case is it even finding the data your referring in the code

#

Im sure I had a similar issue when trying to do the driver count for ours, got it working eventually but never ended up using it will take a look when I’m Home

molten depot
#

but now i have to do some workarounds and actually start working with headers

summer gyro
#
const vtcAPI = 'PROXYLINK' + encodeURIComponent('https://api.truckersmp.com/v2/vtc/68863');
const membersAPI = 'PROXYLINK' + encodeURIComponent('https://api.truckersmp.com/v2/vtc/68863/members');
const eventsAPI = 'PROXYLINK' + encodeURIComponent('https://api.truckersmp.com/v2/vtc/68863/events');
const userAPI = 'PROXYLINK' + encodeURIComponent('https://api.truckersmp.com/v2/player/');

const driversArea = document.querySelector('.drivers-area');
const driverCount = document.querySelector('.driverCount');
const eventCount = document.querySelector('.eventCount');

fetch(vtcAPI, {
    headers: {
        "User-Agent": "",
        "Cookie": "cf_clearance=",
    },
})
.then((response) => response.json())
.then((json) => {
    console.log('JSON response:', json);

    let driverCountRes = json.response;

    if (driverCountRes) {
        driverCount.innerHTML += `<span data-purecounter-start="0" data-purecounter-end="${driverCountRes}" data-purecounter-duration="1" class="purecounter"></span>`;
    } else {
        console.error('driverCountRes is undefined:', driverCountRes);
    }
})
.catch((error) => {
    console.error('Error fetching data:', error);
});

Can’t do much on my phone but try this and see what it logs

{
    "error": false,
    "response": {
        "id": 68863,
        "name": "VTC Name",
        "members_count": 40
    }
}

Should log something like that if it’s being received

summer gyro
summer gyro
#

Press the arrow on undefined and status

molten depot
summer gyro
molten depot
#

idk

#

ask cloudflare

summer gyro
#

What proxy are you using

molten depot
#

2 months ago i was using corsproxy

#

now im trying it with allorigins

#

neither of them work

summer gyro
#

Hmm I have used corsproxy on tmp before and it has worked

#

Will take a look when home for you

molten depot
#

now i keep hitting the cloudflare captcha

#

i just tried it with corsproxy again and now im getting this

ember canyon
molten depot
mental idol
molten depot
shadow marsh
#

Try it without proxy. Don't understand why you do it that way

molten depot
molten depot
summer gyro
#

Honestly didn’t touch my pc last night

shadow marsh
#

Wth... I don't have a proxy as well and I can access the API with no issues

mighty rain
#

it'll work if requesting it from the server but not browser wesh

shadow marsh
#

I mean from my bot who's hosted on a server in germany

molten depot
#

not trying to access the API via a server tho nor am i trying to access it via some bot
im trying to implement it into an website that im currently coding

#

plain HTML, css and js

#

if i wanted to use the API on a bot i can just use the typescript library

quiet python
quiet python
slender pelican
#

That made absolutely zero sense

granite tiger
#

Okay!

lethal prairie
#

Hi dews, I was wondering, you know how to make a delivery software for a company? and that it transcribes deliveries on discord is via a bot or webhook?

violet tulip
lethal prairie
violet tulip
#

you can, surely, is not really straightforward, you must have c++ knowledge

rare fossil
opal arch
#

Another option is reading the game memory but that involves reverse engineering. Which is not maintainable in the long run unless you have tools for it.

cinder kayak
shadow marsh
#

But then you can do more than just "reading" game memory, no?

opal arch
#

You can read much more data in that case.

shadow marsh
#

You misunderstood me - If you have access to the game memory, you can do more than "just" reading, no?

mighty rain
#

that's how trainers/cheats work wesh

rare fossil
shadow marsh
#

Ah okay 😄

somber isle
#

can i have permission to share screen?

night rootBOT
#

Hey @somber isle! HaulieWave

Verification

You can get the Verified role by linking your Discord account with your TruckersMP account.

pinkdot Click on the server name "TruckersMP",
pinkdot Select "Linked Roles" in the dropdown-menu,
pinkdot Click on "Verified" and follow the steps.

If verification process is successful, you will be given the Verified role, which will grant you access to more channels, posting images, reacting to messages and more!

mental idol
#

I hate the kernelbase.dll error. now it also haunts me at work

#

(╯°□°)╯︵ ┻━┻

cinder kayak
glass vine
#

stare me looking at this channel wondering what kernelbase.dll error is

mental idol
wise steppe
#

Hi, has anyone heard of displaying in-game mirrors on another display?

#

I’m working on a university team project to create a truck simulator, and it’s shaping up to be a pretty massive setup. We’ve got a motion platform, a steering wheel, a gearbox, and even a truck hull that’s going to be mounted on the platform. My task is to integrate all of this and add some extra features.

One of the challenges I’m tackling is figuring out how to display in-game mirrors on two external screens. Has anyone done something like this or knows where to start?

Additionally, I’m planning to disable the cockpit rendering in the game and adjust the in-game camera position to the center of the truck. This way, the visuals won’t be limited to the driver’s perspective, which makes more sense since we’ll have the physical truck structure around the setup. If anyone has experience , I’d especially appreciate pointers on any config file tweaks or mods that could help.

rare fossil
fossil comet
#

if you're using fetch in JS for example.

#

It happens

molten depot
fossil comet
rare fossil
opal arch
# wise steppe I’m working on a university team project to create a truck simulator, and it’s s...

Your best guess is using multimon and trying to bend it to your needs: https://eurotrucksimulator2.com/multimon_config.php
For disabling the cockpit and adjusting the camera position, you might succeed with just using a different camera mode. Try to cycle through them by pressing the 0 key (on top).

Otherwise, you will have to reverse engineer the engine; this might be an overkill for your solution, but this game is not very moddable, really.

trail vector
#

Setting r_interior and r_steering_wheel to 0 in the config file or console will make it so it doesn't render the interior, as for camera position there's a mod on the steam workshop to disable the seat adjustment limits so you can place the camera anywhere.

primal mural
#

Is it snowing in TruckersMP yet?

shadow marsh
#

false

glass vine
mighty rain
#

!true && 0 && !1

rancid vector
mighty rain
#

uuuu new channel name

summer gyro
#

Not bad not bad

#

hopefully people will understand the use case of the channel now!

cobalt hare
#

Rename channel

rancid vector
#

At least, odds are better now awesome
Thanks everyone who upvoted the suggestion cathug

shadow marsh
#

You're welcome bloblove wee

#

bruh.. itriedgif

rancid vector
#

:maurice tried: Wesh

shadow marsh
#

yeah 😂

#

you saw it in modlogs, didn't you? kapp

rancid vector
#

Unfortunately, I did 🤣

shadow marsh
primal mural
supple shard
#

pro gaming

#

🎮

modest jetty
#

can someone help me with making my bullbar black with ''save edit''?

shadow marsh
#

That's far away from programming

modest jetty
#

haha oops

#

can u help me with it?

shadow marsh
#

I don't save edit, I don't play TMP

lethal prairie
#

Y love api TMP pepelove

summer gyro
#

Very nice

lethal prairie
#

Update for m'y commands 🥰

wheat zinc
lethal prairie
wheat zinc
#

Yes?

lethal prairie
#

ta believed as you did not know dev I use chatgpt?

#

its been 4 years I develop bots discord, I never use chatgpt

lethal prairie
# wheat zinc hmmm

I’m not as stupid as you, sorry for not used chatgpt, and then I think with my discord bot certified I do not need chatgpt, so do not accuse without proof the jealous

summer gyro
# wheat zinc yes u are

What is your issue. It’s a simple embed which gathers info from a res api. I’m sorry but if you can’t code then state that but don’t go accuse someone of using gpt when you don’t even know.

summer gyro
wheat zinc
#

I was just joking

#

xd

summer gyro
#

There wasn’t a need for it tho was there

lethal prairie
# wheat zinc I was just joking

say that it is a joke after criticizing is not forgivable, you criticize a job while its located you do nothing level api and bot discord, so look for no excuse you are wrong

wheat zinc
#

ok

#

then

#

delete all messages

#

and

#

stop

#

with this

#

xd

summer gyro
#

The other alternative would be for you to keep your cake hole shut and not come and start problems

wheat zinc
mental idol
# wheat zinc with this

Technically you should stop with aggravating, provoking and offending others without the need to do it.

wheat zinc
#

bro

#

just delete all messages

cinder kayak
mighty rain
#

inb4 the people get in here wesh

quiet python
molten depot
#

just because you use ChatGPT for your projects doesnt mean you have to make jokes about others claiming they use ChatGPT

undone rover
#

while True:
break

#

Super mega important code

sturdy rock
#

any game dev here ?

cinder kayak
#

No

cinder kayak
# undone rover while True: break

I would like this more:

    return !!false;
}
``` ![Kappa](https://cdn.discordapp.com/emojis/907740568317214771.webp?size=128 "Kappa")
rancid dock
#

hallo

mossy cloud
#

What kind of programming do you do?

quiet python
#

Hello, how's it going? Does anyone know if 3nk file types are still used for game saves? I haven't been able to find a sample to debug, or could it be that I'm mistaken?

trail vector
#

No, AFAIK it's not used anywhere anymore.

sage sequoia
#

Any Unity devs 😅

potent osprey
#

I'm using ETS2 Dedicated Server on Ubuntu 22.04 x64:

I am missing one of the 2 ports, although the server is running with no error.

27015 (Connects players)

server.log.txt: https://pastebin.com/4UhPKzPc
netstat:

quiet python
mossy cloud
quiet python
quiet python
mossy cloud
#

You're welcome, my area of expertise is Laravel/PHP I'm afraid so can't be much help but didn't want you to go ignored!

potent osprey
quiet python
potent osprey
#

no

#

server id dont work either

#

let me get it for u

#

85568392933101943/101
without /101: 85568392933101943

#

server has been running for about 24 hours now

#
 sudo ufw show added
Added user rules (see 'ufw status' for running firewall):
ufw allow 22/tcp
ufw allow 27015/tcp
ufw allow 27016/tcp

quiet python
potent osprey
#

the button is disabled

shadow marsh
#

have you entered your IP?

potent osprey
#

yes

#

also that is not my ip

#

its vps

quiet python
#

I find it strange since the game server is even able to work with the session ID even through strict NAT and no dedicated public IP is needed when using the ID

shadow marsh
#

I can't check my dedicated as well shrug_animated that tool is broken ig

quiet python
#

yo need add :PORT to IP

quiet python
potent osprey
shadow marsh
#

💀 you get a bomb of info

quiet python
#

its normal

potent osprey
#

the ping was enabled for a different server but ill disable it soon

#

(same subnet, not same server)

quiet python
#

I suspect that the installation of your server is not correct, did you check everything well? https://modding.scssoft.com/wiki/Documentation/Tools/Dedicated_Server

If nothing works anymore, try re-installing the software. I recommend LinuxGSM which makes things much easier https://linuxgsm.com/servers/ets2server/

shadow marsh
#

I cba doing it manually - I let it run with Pterodactyl. handy for controlling it as well 😄

potent osprey
#

yeahh

#

no can do

potent osprey
#

ur not gonna believe this

#

linuxgsm doesnt work

quiet python
# potent osprey ur not gonna believe this

Well this is a very particular situation. As I said I use LinuxGSM and I'm doing very well. The other thing is that it is some kind of problem with your vps provider, the image you install or some other problem like your provider somehow blocking this kind of traffic. I don't know what else to tell you because anything is possible

potent osprey
#

no server error, which is weird

#

what protocol does the server use

summer axle
#

is there any way that I can get the svg or ai logo for the tmp logo, i am trying to add the logo to an icon repo for an open-source authenticator app

mossy cloud
# summer axle is there any way that I can get the svg or ai logo for the tmp logo, i am trying...
TruckersMP Forum

Use of our brand assets We are very proud of our logo and other assets, and we require that you follow these guidelines to ensure they always looks their best. Our logo White version Colored version Our small logo (badge) Our mascot (Haulie) Space and size When you’re using the logo or other asse...

summer axle
#

all the pictures here are imgur pngs...

summer gyro
#

because thats what it is. https://truckersmp.com/assets/img/truckersmp-logo-sm.png

summer axle
#

didn't they have ai files in a now deleted onedrive folder?

summer axle
#

is there really no way to get a vector of this logo???

molten depot
#

Use an vector generator or smth

brave galleon
potent osprey
brave galleon
#

100, 101, 27015, 27016

#

And the Steam token!

mighty rain
compact quarry
#

Is there any chance so u can make more choices and options available in the Freight Market/Cargo Market?

#

I've had a scroll through the files and looked for some tutorials, but at last I only see the Virtual Speditor.

#

Can anyone confirm me that there is a possible change if I do this:
def/economy_data.sii --> no_cargo_prob --> 0.1->0.
By what i understand does that change the possibility of the slots in the certain city being empty to 0. Which will give me the MAX number of job choices i can get.

summer gyro
#

Doesn’t relate to programming?

compact quarry
#

I'm making a mod out of it but I need to know how it works first

mighty rain
brave galleon
#

For Trucksbook I made a utility for searching for employees who increase speed. Everything is clearly visible and there is a search by nickname!

shadow marsh
#

Since when Trucksbook has an API?

mossy cloud
#

Suprised no-one's shared it here yet, but this looks interesting in 24hrs: https://www.youtube.com/watch?v=qZRvDqXc2nc

Subtitles are available in many languages!

Follow our Game Developer, ShawnCZek, along his journey at TruckersMP. What are every day challenges and tasks? What did we accomplish in 2024 and what is coming up next?
We are super excited to share this video with you. Thank you for all your support, see you in 2025!

Crew: Vicc & Luna.
Edited by:...

▶ Play video
mossy cloud
#

Something I'm playing around at the moment with is https://laracord.com/docs/installation - Seems to be a great way to make Discord bots with a Laravel micro-framework. I'm going to make a penguin tracker with it, so I'll share once I have an update 😛

Laracord

Learn how to install Laracord and get a Discord bot up and running in just a few steps.

mossy cloud
#

It is certainly easier 😄

brave galleon
shadow marsh
#

Ahhhhh

humble carbon
#

Oh ignore

shadow marsh
#

That's why I love Trucky. Rich API CE_CatGiggle

shadow marsh
#

i aint feeling shameful rn wesh I use it myself for the game fitted CMR

#

(not done yet)

brave galleon
#

Alas, trucksbook is not so heavily loaded in the form of an interface and it has everything you really need, so this is my choice and the choice of the vtc company

mossy cloud
#

@opal arch Light mode discord? 😛

shadow marsh
opal arch
mossy cloud
#

Fair enough 🙂

opal arch
#

Just VS does not have a nice white mode

shadow marsh
#

It might be better, yet I can't stand a whole room brightener 😂

mossy cloud
#

Just out of pure interest, are items spawned in the game able to persist between server shut downs, or is that a purely temporary thing for events? 🙂

#

That's a super cool feature

mossy cloud
#

Great job, you've done great work with mwl4 🙂

dire schooner
void spear
#

Im sure ive read the opposite in many research posts

summer gyro
void spear
#

Mwl4 if you read this, im wondering what happened to your tachograph mod? I recently saw a video for it and ive been wanting to make that exact mod for years now

#

Just wondering if you ever did release or if its been discontinued

#

Although im not good at doing modeling i was going to try and code a ui version

mossy cloud
# mossy cloud It is certainly easier 😄

Just wanted to show off further to this, have now created a discord bot showing the migrations of penguins using a laravel micro-framework. Had to consider both Google maps' API limits in terms of too long of a URL, and Discord's message embed length - The amount of location data behind each of these lines is massive! Had to cut it down to only those points divisible by 18 😮 And will of course change each line colour before release 😛

glass vine
mossy cloud
mighty rain
#

OSS the best

summer gyro
#

fr

mossy cloud
#

Think Cordelia got lost kekw

mighty rain
#

im curious where'd you get those routes

#

or are they like random or something

mossy cloud
#

They're from a penguin tracking API, that I found embedded on a preservation society website 😄

#

The data key is public, so don't worry that I've included it

mighty rain
#

oh interesting

mossy cloud
#

But that shows the full location data of each of the penguins. The problem is, it's way too much data for both Google Maps, and Discord. So at first, I found I could do each point divisible by 18, as that cut the data down enough to fit in both Google Maps API and Discord's message length. But this wasn't accurate enough, and there's not enough discord colour emojis to cleanly identify each penguin. So I've now chunked the data into groups of 5, and the data can now be paginated through

#

And this allows me to do every location point divisible by 3, so a lot more accurate as well ❤️

mighty rain
#

nice

mossy cloud
#

ty ^_^

shadow marsh
#

Looks good! 😄

mossy cloud
#

Okay that just got automodded

shadow marsh
#

what got automodded? HmmGe

mossy cloud
#

As you can see in the original dataset, none of the penguins have names - So I've used laravel's faker facade to generate names for each penguin

shadow marsh
#

I did yes

mossy cloud
#

It's the code that gets automodded lol

#

So I add the friendly name to the dataset, which is stored in a file so I don't keep hitting the API and I can pull the names from that 😄

mossy cloud
naive belfry
mossy cloud
#

if ( $key==0 || ($key+1)%3 == 0 )

So more correctly, I was checking if the remainder of the key divided by 18 was 0. This helped cut down on the number of data points, but reduced the accuraccy of the map

#

As I was able to chunk the results by groups of 5, I was able to reduce that to $key + 1 mod 3

#

Google Maps API only allows GET requests, so that needs to be a maximum of around 8500 before encountering a 413 Request Entity too large error, and Discord only allows a 4086 message length iirc. So that severely cuts down on what I'm able to achieve. So instead of attaching the image by URL, I save the image to file, and then upload that as an attachment

#

It gets round it, and means I at least don't have to worry as much about the length of the URL

naive belfry
#

Oh I've got you. So the API returns a full track of the penguin's movement, rather than just its current location - and since there are a large number of points per indivdual pengy, you cut down as many intermediate pings, but retaining just enough for a rough approximation of its movement?

mossy cloud
#

You've got it 🙂

naive belfry
#

Do you currently have a feature to grab the latest penguin locations? So rather than the whole track, just the individual points of each one?

mossy cloud
#

That'll be the next thing I'm adding to it, as well as seeing the track for a particular penguin 🙂

naive belfry
#

What db are you using to store the tracks?

mossy cloud
#

Not using a database, I use json_encode once I've added the friendly name to the dataset, and then store it as a JSON file using the Storage facade

#

Then I just read from the file. That file is updated from the API at each boot of the bot, and every 2 hours

naive belfry
#

Gotcha - have you considered aggregating the points into WKT linestrings and storing these rather than each individual point (useful if you're not bothered about the timestamp of each ping, but rather the whole track)

glass vine
mossy cloud
mossy cloud
naive belfry
#

np i work with mapping data as a job

mossy cloud
#

oh neat 🙂

naive belfry
#

worked in traffic data for half a decade, now moving onto transit

mossy cloud
#

And your therapy sessions are how many times a week? kekw /s

naive belfry
#

ahahaha

#

rip my brain

naive belfry
#

hey man so I had a look at the data and it appears the tracks haven't been updated since aug/sep 2024

mossy cloud
#

Thanks, ill email them and find out - Might just be a case of they only update every 6 months or something

#

If so I don't have to bother fetching the data from the API at all on a refresh

naive belfry
mossy cloud
#

Thank you 🙂

quiet python
mossy cloud
mighty rain
#

pause.

quiet python
naive belfry
#

what's everyone working on atm?

#

I'd like to get involved in a hobby/open source project... I do Python, mainly data analysis, transformation/wrangling, but have experience with front-end, and of course relational dbs (postgres - with postgis - and other sql flavours).

shadow marsh
#

I'm mostly working on my multigaming community (e.g. discord bots, minecraft plugins) and yeah 😄 nothing too wild

naive belfry
#

I've only really just joined Discord tbh. Are bots a big thing - I remember being on IRC back in the day and making a few terrible ones for that lol

shadow marsh
#

yeah - they're fun to code with 😄

#

espicially if you can/want display data or minigames like hangman or such :3

naive belfry
#

oh cool - what's the usual tech stack for building them?

shadow marsh
#

mmm well, you can use any language - python, java, js, php and probably even assembly 🤣 I use Java happ

naive belfry
#

Wow, Java, you're brave ahahah

#

I have PTSD from Java exceptions honestly

shadow marsh
#

well minecraft is java - thats why I chose 😂

#

otherwise... I'd went into web dev (php, etc.)

naive belfry
#

Ah I started in web dev

#

I have a love-hate relationship with PHP

#

I have a soft spot because it's what I started with - but I also hate its guts

#

like how tf does 0 == '0'

#

evil

shadow marsh
#

well, I have a hard time learning new stuff - like seriously

#

it was truly a marathon learning for a drivers license - i dont wanna do it again for yet another coding language

mental idol
naive belfry
#

oh never heard of blazor/razor but just googled - is it a .net framework? what ide do you use

mental idol
#

yes

#

and currently rider but also visual studio

naive belfry
#

ah nice, I was gonna ask if you were using rider

#

JetBrains is just great

#

I use PyCharm

#

nothing has come close to the hinting - vs code just sucks

#

CoPilot + PyCharm improves the code hinting somewhat

shadow marsh
#

Well, I, for my part, use Eclipse IDE CE_CatGiggle hated by many, I love it

mental idol
naive belfry
#

I'm waiting for somebody to proclaim they only code in vim

#

"it's easy bro trust me"

mossy cloud
naive belfry
shadow marsh
#

I wish I could be a web developer (front + back end) but no.... 💀

mossy cloud
naive belfry
mossy cloud
#

And it's so easy to read and understand as well, as long as it's maintainable

naive belfry
#

and the errors made no sense

mossy cloud
#

Yeah, PHP 8+ is much more strictly typed.

shadow marsh
#

well, I tried it - not only once or twice but a few times. Every time I cancelled cuz i got overwhelmed kek

#

thats why I rely on others for my project

mental idol
naive belfry
#

I have some PHP I wrote sitting on the backend somewhere at the Financial Times lol

mossy cloud
#

Oh nice!

naive belfry
#

FancyTable I called it

mental idol
naive belfry
#

Unstructed JSON from SOLR needed to be dynamically displayed in a paginated table

#

so I built a library that would wrangle it nicely

#

that was like 2015

naive belfry
shadow marsh
naive belfry
mossy cloud
#

Depends on the comparison operator. == yes, === no

mighty rain
naive belfry
#

And I think also LLMs are mostly trained on Python so it's the standard for people starting out when they ask GPT for advice

mighty rain
#

Python is indeed really friendly with ML

naive belfry
mighty rain
#

although I woldn't say a language like JS is harder than python

#

my internet is taking a walk outside this evening it seems SMH

naive belfry
#

JS is fairly new to the backend world, while Python has always been used for server-side/client applications, whereas JS was adapted from a front-end language

#

so might not have the same maturity

#

Better than learning pure C I guess

#

I would like to learn TypeScript though, seems useful

mighty rain
#

I started with node myself tbh and never really touched Python to an extent where I'd make something with it

naive belfry
#

I got into Python for work - having Jupyter is helpful

#

good for ad-hoc analyses

mighty rain
#

the things you could make with the typings sometimes amaze me

#

and the way some libraries take advantage of that

mossy cloud
#

I've tried my hand at Golang as well, but I do struggle to get my head round it. One day though 🙂

mossy cloud
#

Best to click on 'Download Repository' in the top right

azure stratus
#

Basically the industry standard in my field of research for bundling copious amounts of data Wesh

mossy cloud
#

I only found out about it today! My real name is on my github, so don't want to share that publicly 🙂

azure stratus
#

It's a great tool for us for the same reason - our peer reviews are double blind so we can't share github repos or have to make a github account per-paper which isn't great

mossy cloud
#

Ah very nice! What field are you in if you're happy to share? Academia or medicine I presume?

azure stratus
#

It makes for a very nice Google Scholar profile Kek

mossy cloud
#

Ahaha I bet! Which country are you from?

azure stratus
#

Canada 💪 🇨🇦

mossy cloud
#

My university in the North of England were doing a bit on LLMs

#

Nice 😊

azure stratus
#

Conferences are great for that

mossy cloud
#

I bet 🙂

naive belfry
#

starting a new job on Monday 😎

mossy cloud
#

Oh congrats!! Is this the transit you were talking about the other day? 😊

naive belfry
#

Gonna be fun I think - will be working with Google and Microsoft

mossy cloud
#

Show-off 😛 Nah, good for you man, well done!

#

I assume this is to do with transit based mapping data for both companies?

naive belfry
mossy cloud
#

Haha fair enough 😂

#

Best of luck ^_^

naive belfry
#

It's definitely a unique job anyway ahaha

#

thank you, and to you with your new PHP job lol

mossy cloud
#

Thank you! catthumbsup

mossy cloud
#

Mind you, I'm the same with PHP and JetBrains 😂

naive belfry
mossy cloud
#

PHPStorm!

naive belfry
#

Oh okay!

#

Damn they make everything

mossy cloud
#

It's ideal ❤️

naive belfry
#

I remember the olden times when I wrote PHP in notepad ❤️

#

or nano

#

without code highlighting

#

I kinda want to spin up a Symfony install just for old times sake

mossy cloud
forest root
#

which graphic card good for 90+ fps ?

shadow marsh
#

What has that to do with coding?

summer gyro
#

Yeah fr

molten depot
#

How long does it usually take for pull requests to be reviewed? Saw something missing on the API Documentation and added it in a week ago

mossy cloud
#

Mine took 4 days to be merged, so I wouldn't worry 🙂 You can always point your composer.json to your repository if you need it for your project

mossy cloud
fast fossil
#

hey so im working on some stuff with prism

and ive seen these pointer types like owner_ptr_t and plain_ptr_t

i guess they work like this prism::plain_ptr_t<prism::...> some_pointer = ...

but i have no idea how they should actually look, how they work, what they are for etc etc

if anyone knows please show 🙏

these are the pointer types i found btw:

namespace prism 
{
    class owner_ptr_t {};
    class plain_ptr_t {};
    class auto_ptr_t {};
    class auto_vec_ptr_t {};
    class link_ptr_t {};
    class void_ptr_t {};
    class c_item_ptr_t {};
    class asset_ptr_t {};
}

(ping on reply!!)

shadow marsh
#

currently trying to design a ticket transcript site for my discord bot 💀

mossy cloud
#

Great start mate! 🎉

shadow marsh
#

Thanks!

#

its..... really not that hard

#

it just takes a shitton of time kek

mossy cloud
#

Yep 🤣

shadow marsh
#

pretty sure a known developer makes that asleep whilst being in a coma

#

💀

#

my browser history be like: how to do, how to do, how to do, chatgpt, w3schools and whatnot 🤣

#

but php i never will touch 🤣 html is already too steep for me - dont wanna imagine js nor php

mossy cloud
#

Thing is there's no shame in that, everyone learns somewhere! I still refer back to the most basic stuff sometimes because I second guess myself 🤣

shadow marsh
#

That's true yes ablobnod

#

I just try to merge from the old ticket transcript site to the new one the footer and header with the relevant info.... thats a pain

mossy cloud
#

Just don't forget to look at the bigger picture - Although it's great what you've done, you'll need to store data and retrieve it, so you'll need a back-end language for that

#

Although I'm happy to point you in the right direction if I can help 🙂

shadow marsh
#

there wont be php implemented - I've got my own way to do that 😂

#

whilst other developers would the hell disagree with my solution - it does work like a charm tho

mossy cloud
#

If it works for you, and it's secure then go for it

shadow marsh
#

Secure - well, that's a good question. Probably no. But I have something in mind which will make it more secure 🙂

mossy cloud
#

Just remember, as I was given this advice by TuxyQ many years ago, never trust the client 🙂

shadow marsh
#

Well, if I could I'd do it the more secure way - but as I said, now learning another language would send me to a code burnout as I already handle everything on my server. And I tried to get Web Developers who could do stuff - preferably voluntarily. But either they are self overloaded with projects or want money - which is understandably as volunteering doesnt give you anything despite a big thank you from me

mossy cloud
shadow marsh
#

🤣

shadow marsh
#

Finally figured it out how the base design looks like happ

azure stratus
shadow marsh
#

yes

#

I will make a template and the bot does the rest

azure stratus
#

Fair enough, just wasn't sure if you were doing it out of not having an alternative (like I was haha)

shadow marsh
#

I am pretty sure there are alternatives

#

but....

azure stratus
#

(if you can't tell, I freely admit that I suck at html/css)

#

Oh 100%

#

Worth making it if you have the time and patience

shadow marsh
#

that way I can learn HTML better yk?

summer gyro
azure stratus
#

It can either fetch from a channel or you can provide an object for messages, and it renders it into Discord-style MD

shadow marsh
#

well, I use Java JDA - so couldnt use that lib anyway 🙈

azure stratus
#

Ahhh fair enough

summer gyro
#

Thx

azure stratus
#

Yeah we were just looking to move from our old tickets tool to something in house, and transcripts were ultimately my lowest priority consideration at the time

shadow marsh
#

Well, they have no priority for me either cuz whats closed is closed but since someone asked me for my bot (or better the ticket part) I have to do a revision

azure stratus
#

Yeah that makes sense

shadow marsh
#

but thats okay - so mine is updated as well and then I'll modify everything for the pure ticket bot as mine is a multifeature bot where tickets are just one portion of the feature(s) it has

summer gyro
#

i have the joys of a college assignment, they basically want me to create a basic 6 page website

azure stratus
#

My current "joys of university" is writing a project proposal for our SWE course as well as marking advanced OOP assignments

summer gyro
#

That sounds WELL worse then mine ooh god

shadow marsh
#

cant show more yet as I'd have to black out stuff. But it does work fancy for now. Now time to debug CE_CatGiggle 🐛

mossy cloud
#

Nice 🙂 What are you using for data storage?

shadow marsh
#

MySQL ablobnod

mossy cloud
#

Sounds good. Make sure you're protecting yourself against SQL Injection - worth reading up on if you haven't already, as users may try and drop your tables if you're not careful 🙂

shadow marsh
#

Already done because before the data gets sent to DB its not only hashed and only decryptable with a password I also deform such commands so not even JS Injection could happen in the transcript site

mossy cloud
#

Nice one 👍

shadow marsh
#

I'm careful, of course. I mean my nearly 50 member server i know most of and know nothing will happen. But soon I'll have 20k members with that bot under my hands on which I know a handful of people only.

#

and obviously there I need to be careful

mossy cloud
#

Yeah man, you already sound like you have it covered 🙂

shadow marsh
#

Of course. As the text handling still happens in my bot and I do handle Java very well, so a bit Regex here and there, some if/else stuff and I am good to go. Of course there are still people trying to do shit, but that's why I have an integrated Ticket-Ban command so if I catch people trying shit I simply close the ticket and ban them from the system - if they need help, a mod has to open a ticket manually.

naive belfry
#

How was everyone's week? 😄

supple shard
#

Question for anyone experienced with CSS. It's been a while and I'm just working on a small UI component but I'm noticing some odd behavior with the way border colors are displayed.

For some reason, background-color of an element seems to affect the border color. I swear this is new and never used to happen - and shouldn't happen if transparency isn't used.

Reference code, HTML:

<div class="parent-wrapper">

  <h1 class="header">Some Title</h1>
  <div class="content-wrapper">
    <span>My super amazing content</span>
  </div>

</div>

CSS:

body {
  color: white;
  background-color: black;
}
.parent-wrapper {
  height: 700px;
  width: 500px;
  padding: 15px;
  border: 1px solid white;
}
.content-wrapper {
  background-color: #212121;
  border: 1px solid #007bff;
}

Note that border is set to a HEX value for a nice shade of blue, but modifying the background-color changes the displayed shade of blue. Anyone know what's up? Is my browser just bugging out? How would you mitigate this because it's problematic where you want multiple elements to share a border color despite having a different background color.

#

Demo pictures that show a change in border color despite only changing background color:

#

Seems to happen in Chrome but not Edge

mental idol
supple shard
lethal prairie
#

hi, with API TMP we can have stats of the genre, number of players on a server etc? like the bot TMP?

cinder kayak
honest obsidian
#

Anybody with experience with the SCS Telemetry SDK? I'm using RenCloud's wrapper for it and can get information no problem using the offsets and byte sizes defined. However, I was hoping to convert the x,y,z coordinates that telemetry gives to cities. Is there a straightforward way to calculate this? I've found a few external tools but I was hoping there would be some implementation I could work into a small project I'm thinking up

modern widget
# honest obsidian Anybody with experience with the SCS Telemetry SDK? I'm using RenCloud's wrapper...

out of curiosity, which external tools did you find?

i'm working on something similar for one of my projects, and the only solution i found was to parse the game data to find bounding boxes for cities (because as far as i can tell, a city in the game can have multiple boxes associated with it, probably so that different places/approaches can trigger the "SomeCity Discovered" event), then decide whether a point is at/near a city, based on whether it's within/close to one of those boxes.

honest obsidian
# modern widget out of curiosity, which external tools did you find? i'm working on something s...

This is the tool I've seen mentioned. Your bounding box idea might actually work for me. I'm basically trying to write a "roleplay" style plugin where you're a taxi driver. So it'd just track the starting city, time, mileage, and end city. https://github.com/Koenvh1/ETS2-City-Coordinate-Retriever

GitHub

Grab the coordinates for each city and turn them into usable JSON. Also contains premade JSON files. - Koenvh1/ETS2-City-Coordinate-Retriever

modern widget
honest obsidian
#

Thanks! I just thought it'd be fun since I like driving around TMP in a taxi and why not have a little RP part built in. It'd be cool if there could be actual jobs you could take

modern widget
#

you can always set up a dispatch server that the plugin connects to, to assign + track jobs 🙃

honest obsidian
#

ohhh good idea, i'm gonna write that down

serene moss
#

mby fix that embem TMP

mighty rain
#

What do Discord embeds have to do with TruckersMP?

summer gyro
serene moss
mossy cloud
# serene moss mby fix that embem TMP

This is expected, and isn't TMP's fault. Essentially embed data is gathered from the Open Graph description field, which doesn't parse the markdown the user provided

rancid vector
#

instatntly catwtf

tepid coyote
#

why is my test bot in so many servers

cinder kayak
#

Why not? 👀

tepid coyote
shadow marsh
#

Your bot is in more guilds than mine wesh but my old bot is still one a big one (3k members - roughly).

tepid coyote
#

i think i have a bigger one tho

#

but anyways, after 2 hours of doing whatever and trying to get this thing done, this is how far i got 😭

shadow marsh
tepid coyote
#

it used to work just fine, but the the API i used to fetch everything i needed ended support for jsonapi, so i had to quickly fix everything to work with GraphQL, and half the levels were are now missing when trying to create a playlist and it needed a rewrite

#

soo yeah

tepid coyote
shadow marsh
#

Soon mine gets into Trucky - with 20k members CE_CatGiggle

shadow marsh
#

kind of scared ngl

#

but.... I'm sure nothing will go wrong

mossy cloud
#

Well my advice here can't have been that bad kekw

shadow marsh
#

as in? PES3_Sus

tepid coyote
shadow marsh
#

why? 😄

tepid coyote
#

well cause im dumb

#

and i might aswell delete everything accidentally

#

with how dumb i am

shadow marsh
#

😂

#

do it like me

#

before you do actions log everything and see what does what (espicially with many if/else, for, while statements so you can trace in the console what does what

#

best approach you can do

tepid coyote
#

yeah its what i always do

#

logging is important

#

literally logging everything tthat could trace an error

shadow marsh
#

gud gud - what language is that - if i may ask?

tepid coyote
#

python

shadow marsh
#

looks kinda... like... js?

#

oh

#

ssssssnake lang

tepid coyote
#

sssssss

shadow marsh
#

I hate Python 😂 well, I hate any language which isn't Java kek might be because I'm too picky and too reserved to learn a new one lol

tepid coyote
#

recently been doing a bit of C# to make some zeepkist mods

#

got a project on that too

#

its called playlist importer

#

and a problem the game has is that to share playlists, you have to share files around

#

but using codes and a command makes the process a whole lot easier

#

and i could make a webpage with lists of different themed playlists people can upload, and it'd all be very cool

#

and they just import playlists with a command

#

honnestly big project, cause its all learning

#

learning C#, HTML, JS, CS

#

thats 4 languages i need to learn for 1 project

tepid coyote
#

grrr im getting nothing done istg, 2 hours and all i have is this TPA_Emoji_Waaahhh

cinder kayak
#

Python... PES_JesusChristAlt weirdleave SCrunFAST

cinder kayak
tepid coyote
lethal prairie
#

my multi language bot and which is mainly for server protection, is on 69 servers and helps 25,000 members in total pepe_5head

#

small question, on the API TMP, we do not have the possibility of having an event of the API that allows us information or other on the applications of a specific VTC?

#

I explain, I would try to create an event that will ping my staffs when someone is going to apply on my VTC, and I would like to know if this is possible or not? Compared to the API?

#

(ping me for response)

mighty rain
lethal prairie
mossy cloud
lethal prairie
mossy cloud
#

It likely wouldn't be an API thing. It would be a case of you providing a webhook URL, and then maybe some checkboxes for events that you wish to recieve

#

Don't forget it's not possible to receive information about deliveries, but it would be feasible to say you want info about who's joined and left etc. That's possible to do 🙂

lethal prairie
#

for deliveries, I use the vtlog api 😄

but for being notified for an application on a VTC it is in webhook if I understand well?
Same for a member of a VTC who arrives or by a VTC?

mossy cloud
#

Yeah, suggest that on the forums (if that's what you're wanting) 🙂

mighty rain
#

There's already a Discord webhook feature, but it's limited to verified VTCs only

summer gyro
mighty rain
#

Yes

summer gyro
#

Ah

quiet python
# fast fossil anyone? 🥺 :)

I don't know much about C++ but I'm sure that these types are to improve the clarity of how to handle memory in a more secure way instead of using the standard library directly

sick timber
#

Anyone here that knows a thing about dll mapping on C++ and Python? pleading_taco

I’m trying to develop a telemetry to link with my API but i am not managing to use dll map to retrieve the data from the telemetry dll shadows_cry2

devout obsidian
#

why is TMP down on ATS?

mental idol
quiet python
# sick timber Anyone here that knows a thing about dll mapping on C++ and Python? <:pleading_t...
GitHub

ETS2 (Euro Truck Simulator 2) & ATS (American Truck Simulator) SDK plug-in. Telemetry data is shared via SharedMemory/Memory Mapped Files. - RenCloud/scs-sdk-plugin

summer gyro
#

@shadow marsh dont suppose you could do me a favour in dms could you

shadow marsh
#

Sure 😄

shadow marsh
#

@golden helm HmmGe

glass vine
shadow marsh
#

Timesy aint slow

#

xD

glass vine
#

i bet @zealous galleon is faster

zealous galleon
quiet python
rancid vector
fathom fox
#

Someone that develob website dm me i need help im starting my carrer

shadow marsh
#

Simply write what your issue is and someone will help you 🙂

brave galleon
#
  • Fact. If you want to make L7 protection against DOS attacks. You need to move towards the ID package. Well, do this not at the level of the operating system, but at the nucleus level.
#

And in order for this to work with the most minimal losses, it is necessary to study the machine code.

summer gyro
#

@golden helm

cinder kayak
#

@golden helm

#

Time to time your time.

humble carbon
#

Just saying but wix is great.

limpid junco
humble carbon
mossy cloud
#

Oh yeah for sure lol

naive belfry
cinder kayak
#

Time to test Eclipse-PHP. Kinda hyped SChype

shadow marsh
#

Afaik looks like a normal eclipse, just with the needed addons to code... in php ablobnod

cinder kayak
#

Yep. It's... Well... Need to get used to it... It's not setting curly brackets ( { } ) like I'm used to, but it's fine yet SCcatMIAO

#

A bit more fun that I had in VS-Code hmmge

shadow marsh
#

is it? 😄

#

never tried it out really, as I use Eclipse mostly for Java and the rest Notepad++ (except the WebAPI I have written in VS Code)

cinder kayak
#

I used to use eclipse back in the days when I coded in Java, which is why I had good feelings about it.

But it's indeed a bit more fun than VS-Code YEP

#

Especially since VS-Code throws some kind of error everytime I close it KEKW

shadow marsh
#

is it the NubbieErrorException? kapp

cinder kayak
#

How did you know that? SCpeek2

shadow marsh
#

Was just guessing silly CE_CatGiggle

cinder kayak
summer gyro
#

@high heart

high heart
summer gyro
#

Thx for deleting it

shadow marsh
#

@golden helm

fervent meteor
quaint cobalt
#

Could anyone help me with CSS ? I'm trying to setup twitch alerts.

What I'm I trying to acheive ?

  • On the image below I would like the "This is a test bit alert for ...." to be right next to the username in white

The code:

.widget-AlertBox {
    position: relative;
}
body,
html {
    height: 100%;
    width: 100%;
    overflow: hidden;
}
#wrap {
    position: relative;
    height: 100%;
    width: 100%;
}
#alert-box {
    height: 100%;
    width: 100%;
    position: absolute;
}
#alert-box.hidden,
.hidden {
    opacity: 0;
}
#alert-text {
    padding: 20px;
    text-shadow: 0px 0px 1px #000, 0px 0px 2px #000, 0px 0px 3px #000, 0px 0px 4px #000, 0px 0px 5px #000;
        bottom: -45px;
        left: 200px 
}
#alert-message,
#alert-user-message {
  text-align: left;
    width: 520px; /* Adjust width as needed */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1; /* Limit to 2 lines */
}
#alert-user-message img {
    vertical-align: middle;
    height: 1em;
}
#alert-image {
    position: relative;
}
#alert-image video {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}
#alert-message > span > span {
    display: inline-block;
}
#alert-image {
    z-index: 6;
    position: relative;
}
#alert-text {
    z-index: 6;
    position: relative;
}
#alert-text-wrap {
    z-index: 6;
    position: relative;
}```
small crypt
quaint cobalt
# small crypt Of course we can help, but it will be difficult to do so without seeing the HTML...

That's all I have

<!-- alert image -->
<div id="alert-image-wrap">
    <div id="alert-image">{img}</div>
</div>

<!-- main alert box window -->
<div id="alert-text-wrap">

    <!-- alert text -->
    <div id="alert-text">

        <!-- alert message -->
        <!-- messageTemplate will be replaced with your message template -->
        <!-- for example : {name} is now following! or {name} tipped {amount} -->

        <div id="alert-message">{messageTemplate}</div>
        <div id="alert-user-message">{userMessage}</div>

    </div>

</div>
small crypt
#

Would making the following change in CSS work for you? @quaint cobalt


#alert-message,
#alert-user-message {
  text-align: left;
    width: fit-content; /* Adjust width as needed */
    max-width: 520px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1; /* Limit to 2 lines */
}

#alert-text {
    display: flex;
    z-index: 6;
    position: relative;
}
quaint cobalt
violet tulip
cinder kayak
tepid coyote
#

basically a ghost message

small crypt
#

How often do you recommend getting updates from the API for exchange rate calculations?

As a publication, some API providers update every hour. But I have seen very high-end APIs that can update every 60 seconds. Of course, the costs are high accordingly.

There are APIs that I can get data from every 24 hours, but I think these will cause too many problems.

I'm curious about your thoughts on all of this wee

summer gyro
#

I mean depending on the service and what they have implemented as rate limits I’d guess

shadow marsh
#

Mine is live-updated - e.g. you could request it 1x/s (but is stupid) and get new data.

summer gyro
#

@golden helm hey nub

mighty rain
#

@golden helm ^

hidden rose
#

Anyone know a page where you can see where your stuff got leaked?

#

If so, feel free to ping me

azure stratus
hidden rose
azure stratus
hidden rose
#

Sometimes it does, sometimes not. It depends on what got leaked and where exactly

azure stratus
#

(They don't really want to give everyone unfettered access to raw leaks either way lol, that could be problematic)

#

Leak Lookup and Breach Directory are two names I see thrown around

hidden rose
#

Fair

summer gyro
#

Probably could use intelx to check but I can’t speak more about that website in here I’ll end up getting slapped by a discord mod kekw

summer gyro
bright kraken
#

oh right, didn't notice that channel sorry lol

mossy cloud
mighty rain
#

😭

molten depot
mighty rain
#

javascript isn't java Kapp

paper hound
#

My js is the bestest tho Kek

mossy cloud
#

You've got a circus for a colour scheme kekw

paper hound
#

Dis is the theme I use

mighty rain
#

github dark dimmed >>>

#

been using it forever

#

with minecraft font too 🤤 peak programmer experience

paper hound
#

oh god no

#

not the mc font

mighty rain
#

YES minecraft font

paper hound
azure stratus
#

Monokai theme on top

azure stratus
# mossy cloud

This public static void Meme(String[] args) {} made me laugh Laugh

shadow marsh
quartz moth
#

😭

#

So cursed Kapp

mighty rain
#

best font ever Kappa

#

ngl im so used to it at this point i don't even really see a difference anymore

quartz moth
#

Good to see you guys use branches as well Kapp

shadow marsh
#

I use JetBrain's Font 😄

urban steppe
#

I love the font that is used in visual studio, think it's called Cascadia or smth

fast fossil
molten depot
mighty rain
#

get a formatter 😭

sick timber
sick timber
#

So i prefer formatting it by hand xD

summer gyro
summer gyro
#

@golden helm

fast fossil
molten depot
shadow marsh
#

Okay - I always were a big fan of Eclipse IDE for java. But honestly... VSC is even more fun and way quicker! 😄

azure stratus
#

I use IntelliJ strictly because, being a TA, I’m forced to use it for marking assignments lol

shadow marsh
#

That's okay - I can't figure IntelliJ out... tried 3 times, gave up on it 3 times xD. Stuck to Eclipse - but now tempted to change fully to VSC

azure stratus
#

I just learned to power through it when I got it for free with the student pack

shadow marsh
#

Ah nice! CE_CatGiggle

knotty lance
humble carbon
quiet python
night rootBOT
#

Hola @bitter bay! HaulieWave

<id:customize>

Por favor entienda que este es un servidor de Discord principalmente en inglés. Usted puede dirigirse a id:customize y seleccionar el idioma o los idiomas que hablas para tener acceso al canal especifico de cada idioma.

fast fossil
#

Anyone know for HashFS how the file hashes in version.scs are calculated?

Haven't looked much and just wondering if anyone knows

Assume it's something with maybe parts of the files Metadata as city hash 64?

rancid vector
#

@bitter bay you're now verbally warned for violating #discord-rules

2.1. English is the only language permitted unless stated otherwise.
``` You can speak your national language in the channel selected in <id:customize> 
Thank you
quiet python
summer gyro
#

Not bad for an electron ui tbf

mighty rain
#

wails ❤️❤️❤️

serene moss
#

I think that shoundt be there Kekw

mossy cloud
humble carbon
#

Hey does anyone here know if you can pull from the API if a user is in game within the vtc? Cheers!

urban steppe
#

That flag doesn't seem to be exposed in the API response sadly, might be worth a suggestion on the forum as I also thought on a few occasions that that could be helpful

mossy cloud
#

Not from the normal TMP API at the moment - You can get the information from Krashnz's traffic API, but you must only ping a max every 5 seconds: https://traffic.krashnz.com/api/v2/user/<truckersmp_id>

humble carbon
mossy cloud
#

I don't think so, but don't abuse it or anything. Always worth reaching out though for sure

#

I reached out for it once on the forum

mighty rain
#

Trucky has endpoints if you want to lookup players in bulk, can do so with up to 100 players in a single request iirc

mossy cloud
urban steppe
#

Thanks!

mighty rain
#

how are you calling it?

#

keep in mind that it only accepts a TMPID or a SteamID

mighty rain
#

nice deleted message and ghostping

glass vine
fresh scaffold
#

doing a little programming session for a vtc rn in general if anyone wants to pop in

fresh scaffold
#

hows you

summer gyro
#

Doing good wbu

jolly locust
#

Is TruckersMP interested in AI / Machine Learning staff ? I'm a Computer Scientist with a strong background in AI & Machine Learning and was curious if there is any help needed, since I could offer my expertise.

summer gyro
#

What

mighty rain
jolly locust
night rootBOT
#

Hey @jolly locust! HaulieWave

We value feedback from our users as it is an amazing way to hear your thoughts on TruckersMP and to allow us to continue to improve the project.

You should use the feedback system

purpledot if you wish to provide feedback on team members,
purpledot to discuss a punishment you received that is not game-related,
purpledot to ask a question to a certain management team,
purpledot if you have a request which contains personal and/or private information which you would like to discuss.

You can provide your feedback by following this guide.

mint hawk
#

live map tracker :)
went from whatever the hell this is:

azure stratus
#

Pro tip: if you like math and want to learn a new language, I've learned that Project Euler is great

#

It's like leetcode but actually fun

cursive orchid
#

Hey, #truckersmp-updates message

The right variable is -physc, right? : "C:\ProgramData\kylia\TruckersMP\TruckersMP-Launcher.exe" -physx

mighty rain
cursive orchid
#

Oh noice, thank you

mighty rain
#

I don't think the old launcher supports console options

cursive orchid
#

Apreciate it, thanks mate

#

Pretty buggy at this stage cat_dance

mint hawk
#

that looks perfectly normal, idk what ur talking about

magic meadow
lethal prairie
lethal prairie
humble carbon
#

Hey dont roast me for the newbie question, I am currently making a page that shows the players/how many is on the servers and its working good. But the problem im facing is I am in game on sim 1 and I do /players, and it comes up for example with 500 players, but according to the API its saying 731 players, how often is the api updated? Or am i doing something wrong here? Thanks in advanced!

mossy cloud
#

Nothing wrong! The API is cached, so it won't display an immediate update when the player count changes 🙂

cinder kayak
mossy cloud
mighty rain
#

Haven't paid close attention to when I refreshed the page but it seems like 30 minutes or something like that

shadow marsh
#

if its that, that's way to slow imho. 5 mins are just fine and displays somewhat accurate stats - but... 30 mins?

small crypt
shadow marsh
#

I know

glass vine
small crypt
shadow marsh
shadow marsh
cinder spear
humble carbon
humble carbon
small crypt
summer gyro
#

@mighty rain hey nub

#

Go DMs

molten depot
#

Has or will that new Partners thing TMP has added be implemented into the API?

ocean mural
#

Hi, does anyone else not getting their job delivered or cancelled events fired on version 1.54?

#

Ah seems like something was off with my dll

mossy cloud
molten depot
#

That new Partnership System that was invented, can't wait for it to be implemented into the API as that would make listing an VTC's Partner easier for me

forest root
#

Which video graphic card good for ets2?

mighty rain
forest root
#

Sorry

smoky nest
#

Is the truckers mp website in php?

mossy cloud
#

Not just PHP, but that is the base language used

urban steppe
#

I think that is classified as web scraping, so don't think that is allowed

mint hawk
#

Is that against tmp rules?

urban steppe
#

Isn't it generally illegal? Could be wrong but that's what I was told

mint hawk
#

It's really just specific to the company, some are okay with it as long as you don't abuse the api while others are just against it

#

Maybe one of the devs or someone with more knowledge can comment on the above ?

mossy cloud
#

Yes please do not scrape our services. You can use our API 🙂

small crypt
crude carbon
small crypt
crude carbon
small crypt
crude carbon
molten depot
#

Who pinged me

silent vapor
#

opens programming channel
realises I'm not taking programming
closes programming channel

sage hemlock
#

Hello

#

Do i have to be here for support on truckersmp-cli?

summer gyro
cinder kayak
#

But the community might weshbald

rancid vector
#

Not that it's really related to programming, anyway blobpeek

humble carbon
rancid vector
#

Hmm, you're quite right, I stand corrected 🫶

grim nova
#

I made this its almost useless but yea

mossy cloud
#

Do you plan to do anything with it or just for practice?

grim nova
spare fern
#

Github is a solid option

grim nova
#

used alot of help on this one

mossy cloud
#

Activate ur windows boi 🤣

#

jks, idc

#

Yeah, GitHub is a great place to put this stuff

#

Well done though!

summer gyro
grim nova
small crypt
# grim nova what else should i add

You can try to measure by analyzing the incoming data. For example, it may be useful to add a section showing the uptime data of the servers in the last 24 hours or a wider time period.

In addition, you can also provide a graphical data of how the server population is shaped. You can make the data analysis more meaningful by adding statistics such as the time zones where users are most active, the lowest and highest player numbers in 24 hours.

Such information is useful both in terms of following the general status of the system and provides transparency to the user. At the same time, it can be a very effective study in terms of improving yourself in data analytics and adding value to your project.

Yes, at some point, most of these things are already available and can be found as examples, but at the end of the day, this is your own software, you are both developing yourself and a project, so it does not matter if it already exists. On the contrary, they are great examples for you wee

grim nova
mighty rain
grim nova
#

Ofc right after making it into an exe file 😭

#

it glitches out

humble carbon
#

Okay programmers, question, if you think your project is ready for production, what are some steps you do to make sure its ready for production? Is there any tester that you use, obviously multiple tests etc

mighty rain
#

i test in production

brave galleon
azure stratus
# humble carbon Okay programmers, question, if you think your project is ready for production, w...

Testing frameworks depend on your language and sometimes your preference - for JS/TS I use jest, for Java I use JUnit, etc. Doesn't hurt to have a coverage measuring package as well to make sure you've got good line coverage, but that's really for large-scale prods imo. Test your databases via load testing, make sure you can't do any injections, data atomicity/general safety (not a real issue if you're using a good connection engine & sensible routing), etc.
Other steps I'd take - go back and remove any "it'll work" code with something that's scalable, clean up weird console logging statements, and I'm a big fan of doing a documentation run at the end to make sure I can wrap my head around my code as well.

next crane
# humble carbon Okay programmers, question, if you think your project is ready for production, w...
  • First, your product will never be perfect, and it's never ready to work. The only question is at what stage of development will you decide that the features that you are ready to show work well.
  • Secondly, no matter what tests you run with a focus group, real users will find things that you didn't even know about. Be prepared for this.
  • Third, don't show something that really doesn't work well.
  • Fourth, take risks. Publish it. If you don't do this, no one will know about your project.
mint hawk
small crypt
# grim nova Ofc right after making it into an exe file 😭

It is quite natural to see some mistakes at the first stage. The important thing is to proceed step by step and try to solve these mistakes. To do this, you must first make a good plan and then proceed according to this plan.

We know that this data is not directly provided on the API side, so you will need to process it yourself. There are a few different methods you can follow at this point:

1. Collection of Data

You need to send queries to the API at regular intervals and pull data regularly. In order for this data to be analyzed, it must be stored continuously and consistently.

2. Storage Problem

If data is only processed and stored locally, data gaps will occur during periods when the program is not running, making it difficult to perform sound analysis.

3. Alternative Solutions

I can suggest a few solutions to overcome this problem:

  • Website + Database: Save data to your own database by sending requests to the API at regular intervals through a website you created. You can then create your own API to serve this data to different systems.
  • Integration with Firebase: You can retrieve API data from your website or directly from a server and store it in Firebase. This can be especially useful for instant data tracking and analysis.
  • VDS + Firebase: If you do not want to deal with web infrastructure, you can get API data with the help of a script running on a VDS server and transfer it directly to Firebase.

If the above solutions seem too complicated, simpler methods can be developed for the analysis system. The important thing is to first clarify the main idea and then develop this idea and put it into practice.

grim nova
small crypt
grim nova
#

it didnt happen before i made it exe

molten depot
#

Thanks @mossy cloud for adding an endpoint for VTC Partnerships ^^
You made an little mistake on the documentation tho making the partnership endpoint appear as "Fetch all the events from the specified VTC"

I have opened an pull request with a change ;)

mossy cloud
#

Ah thank you! ❤️

cinder ravine
#

Hello coders 😄

Quick question about the API. I'm using it for my VTC, but I am hitting some kind of rate limit when getting data for all of our events. I can't find any info about the rate limits in the docs 😅

Do you guys have any details on what the rate limits are? Would be super helpful to know so I can avoid running into issues. Thanks!

mighty rain
cinder ravine
#

Alright, will try it and see 🙂
Thank you

mighty rain
cinder kayak
cinder ravine
cinder kayak
#

Queue the requests to make 20 per 60 seconds maximum or so

cinder ravine
#

Alright

lapis garden
#

What's a good way to learn coding at home? I'd like to pick up some stuff even just to be able to mod in general

tribal lava
#

Websites or what?

lapis garden
#

Gaming preferably

daring spade
#

You can actually build a aimbot with one

#

Its not like those pieces you put together, its actual wires and computing

cinder kayak
lofty falcon
#

Is there a version of TruckersMP that works on Linux? It's not mentioned on the website, only Windows 10 is listed.

#

I’ve tried virtualization software like Wine, but it doesn’t work very well.

lofty falcon
mint hawk
#

100% precision crashes

mint hawk
cinder kayak
mint hawk
#

could've just said hello, but ok HaulieAngry

mighty rain
weak edge
#

Hi community,
I have a doubt. I was recently exploring the TruckersMP API and trying to integrate with my VTC 's webpage

The issue I had was, if an event is created and the API is responding with the details,but once the event is deleted, I get the details of the deleted event too, which I don't want to be there

Can anyone let me know what's the cache time for the data given from the API?

daring spade
#

Sort out if it’s deleted or not

#

Should probably be a «state», «action» or «status» for each event

weak edge
#

No that particular deleted event went off from API response after some time.. definitely it's server side cache. I just want to know if someone had figured it out how much time it takes to refresh cache

small crypt
cinder kayak
#

Not for me, I could measure it myself… but maybe for public weshbald

I’d cache it myself in a 5-10-15 (any of them, don’t know yet) delay, no matter how often the API updates itself

#

But thanks @small crypt PES3_HoldHeart

small crypt
cinder kayak
cinder spear
grim nova
#

Guess what browser

#

also using it to write here...

mighty rain
#

chrome

#

or something chromium based

#

because chrome has the same scrollbar

umbral bough
grim nova
#

custom

#

with a LOT of help

umbral bough
#

Cool! 😄

grim nova
mighty rain
#

oh webview then

#

ig

grim nova
#

still beautiful.

summer gyro
#

Also wondering if it’s electron/tauri based or something else as it’s nice to see different projects people make

grim nova
small crypt
#

APIs are fun, but can sometimes be a nightmare 🖊️

cinder kayak
#

APIs are often a nightmare, when the documentation is bad hmmge

small crypt
cinder kayak
#

Just do your own APIs KappaZ

small crypt
small crypt
#

These things look like fun to tinker with, but there's definitely a problem with the speed data Wesh

cinder kayak
#

Don‘t see a problem KappaZ

opal arch
#

The progress also looks fine boomer

small crypt
small crypt
small crypt
# grim nova what is this wow

In fact, this is something I have had the opportunity to try for the first time. With telemetry, you can obtain dozens of data in ETS2, it's so crazy that you can even see the torque produced by the engine

cinder kayak
small crypt
#

Among this data, I also saw a location data that looked very comprehensive. Frankly, I wonder if it is possible to create a history record viewer on the web in 3D 🤔

small crypt
#

This was a test attempt. I was testing whether I could transfer data from the client to the website via the API correctly and logically, and yes, this test phase was successful 😇

cinder kayak
small crypt
#

I'm not sure if I can open the 3D map of the game on the web. Even if I could, it seems like it would cause serious lag. At least I'm aiming to create a 3D viewer with some alternatives I have. At worst, it would resemble games from the 19th century :d

cinder kayak
#

Try a 2D first

small crypt
# cinder kayak Try a 2D first

In fact, at the end of the day, it feels like something I will have to do with 2D. I can generate a 3D road with a simple creator system from a 2D path, of course it will be a flat road network like paper, and then I can add a simple truck model on top of it. The reason I am thinking of going a little more into 3D here is that there are already so many examples of 2D

small crypt
# grim nova Wow how do u get telemetry

I used this https://github.com/Funbit/ets2-telemetry-server for Telemtry, it is very simple to use. The person who made this really worked hard, there is a display in it as well as the Rest API, which allows you to use a vehicle display from the phone within the same network

GitHub

ETS2/ATS Telemetry Web Server + Mobile Dashboard. Contribute to Funbit/ets2-telemetry-server development by creating an account on GitHub.

#

I think one of my personal goals at this point will be to process the telemetry data directly from the game without a 3rd party library. Because at the end of the day I can turn this into a real trucker hub system (I mean there are similar ones, but there will be differences in them) bigbrain

grim nova
small crypt
vagrant geyser
#

python!!!

lethal prairie
#
Erreur lors de la récupération des données : Error: API error: 403 Forbidden - <!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>Attention Required! | Cloudflare</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->
<style>body{margin:0;padding:0}</style>

im' rate limit ? pepe_sob

cinder kayak
lethal prairie
raven harbor
#

I would like to partner with someone 💰

cinder kayak
#

Okey

shadow marsh
#

Ok..... I don't. I wonder what that has to do with development though.

cinder kayak
#

They seem to be a Full Stack AI Engineer. Maybe they want a partner for AI coding weshbald

raven harbor
#

I'd like to cooperate with someone and make many income.

cinder kayak
#

Thanks, I already have plenty of income.

shadow marsh
#

So.... do I.