Causing server crash.
#4

You could simplify this list with a simple SQL query (if you're working with SQL databases), and make sanity checks in your variables to make sure their values aren't out of bounds.

Anyway, why create "m" variable to check if there are more than 0 tickets if you can already know that by checking if totalamount is 0?

Oh, if you're not working with SQL I would use Iterators (y_foreach/y_iterate) to store the player fines, this way you can avoid any kind of checks AND you improve the perfomance greatly.

Also, before I forget, a 128 cell string is too small for a player that has 20 unpaid tickets.
Reply


Messages In This Thread
Causing server crash. - by Dokins - 20.09.2016, 15:17
Re: Causing server crash. - by TakeiT - 20.09.2016, 15:39
Re: Causing server crash. - by Threshold - 20.09.2016, 15:44
Re: Causing server crash. - by Marricio - 20.09.2016, 16:01
Re: Causing server crash. - by Konstantinos - 20.09.2016, 16:03
Re: Causing server crash. - by Dokins - 20.09.2016, 16:10

Forum Jump:


Users browsing this thread: 1 Guest(s)