boofiboi / FiveM-Discord-Presence

FiveM resource to get your server a nice customized Discord rich presence.
GNU General Public License v2.0
15 stars 6 forks source link

[BUG] Error in console #8

Closed operationairstrike closed 3 months ago

operationairstrike commented 3 months ago

Yo the 1.9 didnt fix it, now i get: [ script:discord] SCRIPT ERROR: @discord/server/server.lua:12: attempt to compare string with nil [ script:discord] > userCallback (@discord/server/server.lua:12)

boofiboi commented 3 months ago

do you even have VERSION in the script folder...

operationairstrike commented 3 months ago

I have all files sir

operationairstrike commented 3 months ago

Do you want a screenshot 😂

operationairstrike commented 3 months ago

grafik

operationairstrike commented 3 months ago

folder name is discord

operationairstrike commented 3 months ago

does it matter?

boofiboi commented 3 months ago

Yes it does. It needs to be "FiveM-Discord-Presence" or else Line 7 returns nil and there's your issue.

operationairstrike commented 3 months ago

I'm really sorry. Thanks for the fixes tho. I will rename it on line 7, I guess?

operationairstrike commented 3 months ago

I was thinking about this yesterday, and i think it's true that it's 99% of the time the user that is too dumb to use it and not the code.😂💀

operationairstrike commented 3 months ago

Yo you may add a line to the readme so that people know.

boofiboi commented 3 months ago

It's not the user, its me.

I coded it with hardcoded variables.

operationairstrike commented 3 months ago

Fair point I thought about using $PATH somehow to automatically get the path it's in yk. That would be awesome tbh.

operationairstrike commented 2 months ago

I changed it and there's seems to be no error now

operationairstrike commented 2 months ago

I suggest using $PATH in the code