Thread
:
Skill points become negative
View Single Post
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
04-28-2024 , 15:13 Re: Skill points become negative
#
2
If you need to just make sure that the value doesn't go below zero, you can add a check after every location that subtracts a value such as this:
PHP Code:
if(
g_skills
[
id
] <
0
)
{
g_skills
[
id
] =
0
}
__________________
Polymorph
,
GitHub
fysiks
View Public Profile
Send a private message to fysiks
Find More Posts by fysiks