ID:1668406
 
(See the best response by Kaiochao.)
Hi, I'm coding something for my game but when I try to use it, I get the following error

runtime error: type mismatch: "85" -= 1



This is what the actual lines look like
Code:
        susanoo1
id = SUSANOO1
name = "Itachi Susanoo"
icon_state = "isusanoo"
default_chakra_cost = 300
default_cooldown = 250


IsUsable(mob/user)
. = ..()
if(.)
if(user.ms==0)
Error(user, "You need to be using mangekyou sharingan!")
return 0
if(user.susanoo)
Error(user, "You are already using susanoo")
return 0

Use(mob/human/user)
viewers(user) << output("[user]: Susanoo!", "combat_output")
user.overlays+=image('itachi susanoo.dmi',icon_state="0,0",pixel_x=-64)
user.overlays+=image('itachi susanoo.dmi',icon_state="1,0",pixel_x=-32)
user.overlays+=image('itachi susanoo.dmi',icon_state="2,0")
user.overlays+=image('itachi susanoo.dmi',icon_state="3,0",pixel_x=32)
user.overlays+=image('itachi susanoo.dmi',icon_state="4,0",pixel_x=64)
user.overlays+=image('itachi susanoo.dmi',icon_state="0,1",pixel_x=-64,pixel_y=32)
user.overlays+=image('itachi susanoo.dmi',icon_state="1,1",pixel_x=-32,pixel_y=32)
user.overlays+=image('itachi susanoo.dmi',icon_state="2,1",pixel_y=32)
user.overlays+=image('itachi susanoo.dmi',icon_state="3,1",pixel_x=32,pixel_y=32)
user.overlays+=image('itachi susanoo.dmi',icon_state="1,2",pixel_x=64,pixel_y=-32)
user.overlays+=image('itachi susanoo.dmi',icon_state="2,2",pixel_y=64)
user.overlays+=image('itachi susanoo.dmi',icon_state="3,2",pixel_y=64,pixel_x=32)
var/pickpro=pick("60","65","70","75","80","85","90","95","100")
user.protected=pickpro
user << output("You have been protected [user.protected]%", "combat_output")
user.susanoo=1
sleep(450)
user.protected=0
user.curwound+=25
user.susanoo=0
if(user)
user.Affirm_Icon()
user.Load_Overlays()
user.protected=0
user.susanoo=0


Any suggestions on how to fix it? I'm not sure what I'm doing wrong, though I think it might have to do with the var/pickpro line.

                var/pickpro=pick("60","65","70","75","80","85","90","95","100")


Best response
You're trying to subtract a number (1) from a string ("85"). You could use text2num() to convert the "85" to 85, or you could just use actual numbers in your pickpro set.
In response to Kaiochao
Thank you! That fixed the problem :) This is what happens when I code at 4am in the morning with no sleep, gotta get some sleep.