#help

1 messages · Page 1 of 1 (latest)

somber wraith
#

in line 22 it is giving error

#

pls explain how to fix it

wintry lichen
#

highscore.text, PlayerPrefs.GetString... are strings, for instance it might be "69". You want to compare their integer values presumably, so you have to convert. int.Parse(highscore.text) for instance

somber wraith
#

like this

#

?

wintry lichen
#

"convert. " is part of my sentence, not code lmao

somber wraith
#

oh

wintry lichen
#

now do the same parsing on the right hand side too

#

also you don't want the ; at the end of the if since you are providing a block

somber wraith
#

on scoretext

#

i have done this

#

but it gives error

wintry lichen
#

no, int.Parse(PlayerPrefs.GetString(...))

#

don't put int.Parse inside the GetString method argument

somber wraith
#

ok

#

now there are no errors but highscore is not updating

wintry lichen
#

show code now then

somber wraith
wintry lichen
#

well, do you ever call highscoreupdate?

somber wraith
#

how do i do that

#

sorry i am a beginner

wintry lichen
#

highscoreupdate();

#

really if you don't understand method calls you need to follow the tutorials in the channel's pins

somber wraith
#

ok