#Help Needed

83 messages · Page 1 of 1 (latest)

autumn sail
#

lmk if you need more info

languid hinge
autumn sail
#

I was about to show you then just saw that my ServerScriptService is empty...

#

BRO

#

I accidently deleted it

#

nvm

#

It wasnt showing cause I was in test mode...

#

would this be the right script?

autumn sail
languid hinge
#

but print (profile.Data.Clicks)

halcyon swallow
#

@autumn sail if u want to have harder error handling and prevent the whole script breaking witj no chance of working

#

in ur ‘Clicks.Text = amount’ add a ‘or “0”’ and then return a warning

#

that way players can also report errors from the dev console and you can solve it

autumn sail
#

ok

old nightBOT
#

studio** You are now Level 1! **studio

halcyon swallow
autumn sail
#

like that?

#

Im new to coding sorry if I am sounding dumb

fallow gulch
autumn sail
#

wdym

fallow gulch
#

an actual server script?

autumn sail
#

these are all of my scripts

fallow gulch
#

Does the GetData event work?

autumn sail
#

how would I figure that out?

halcyon swallow
#
if currency == “Clicks” then
    Clicks.Text = amount or0”
—rest of yar code```
autumn sail
#

?

#

hol up

#

its working now

#

no problems

#

ohh its because I had Clicks.Text = amount

#

but added a then onto the end like a bozo

autumn sail
# halcyon swallow no

the fix was temporary because when I was adding a number format compaction Lib it doesnt recognise the text "amount" as a number

#

And thats an error message that in the script its from links to this function

halcyon swallow
#

then provide “0” as 0

autumn sail
#

ok

autumn sail
old nightBOT
#

studio** You are now Level 2! **studio

autumn sail
halcyon swallow
#

it just means

#

amount is not a number

autumn sail
#

nvm its working now for some reason

#

idk why tho

halcyon swallow
#

it wont later

#

or it’ll be spotty

autumn sail
#

oh ye

languid hinge
halcyon swallow
#

idk ur code or what ur doing but you have to have cheks that ensure amount is a number

autumn sail
#

error again

languid hinge
#

Not this script

halcyon swallow
#

if not type(amount) == “number” then return end at the top of ur script

#

that way ut stops execution and prevents errors

languid hinge
halcyon swallow
#

or you can change something about amount and ser it to 0

halcyon swallow
autumn sail
halcyon swallow
#

but the issue is

#

amount is not a number

#

which is an issue from the script he uses it

languid hinge
#

Fucked up data script or sum then

#

¯_(ツ)_/¯

halcyon swallow
#

idk bro

#

@autumn sail

autumn sail
#

ye

halcyon swallow
#

at the top
Of ur

#

updatecurrency

#

do this

#

if not type(amount) == “number” then continue end

#

then

#

do

#

amount = 0

#

you can remove the or 0 then

#

since you set amount to 0 if the given typenis not a mumber

autumn sail
#

I dont have an update currency but are you talking about the script the error is coming from or the script with the click.text = amount or 0 in it??