Jail time

General Chat, Comments
Post Reply
Rodeobull
Posts: 10
Joined: Thu Jan 09, 2014 7:49 pm

Jail time

Post by Rodeobull »

hi

i use the jailbust module for my game and found a bug

in the admin panel you can set the max time that you can be in jail
but when i do a crime or steal anything from shops i always end up in jail with that max time there is set in the admin panel
even when i put myself in jail for any time it will always be that max jail time

i found this part in jailbust and maybe the problem is there

Code: Select all

$result =
        $db->Execute("select reason.value as reason, h1.value as level, u.username, u.id,
                      (jail.value + (length.value*60) - ?) / 60 as endtime 
        	      from users u
        	      left join (select * from user_stats where stat_type = 7) h1 on u.id = h1.user_id
	              inner join user_variables jail on u.id = jail.user_id
	                  and jail.variable_id = ?
	              inner join user_variables length on u.id = length.user_id
	                  and length.variable_id = ?
	              inner join user_variables reason on u.id = reason.user_id
	                  and reason.variable_id = ?
	              where (jail.value + (length.value*60) - ?)/ 60 between 0 and ?
	              order by jail.value + (length.value*60) - time_to_sec(now()), u.id", 
	                 time(), $jailId, $jailLengthId, $jailReasonId, time(), $param1);
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Re: Jail time

Post by hallsofvallhalla »

Thanks for sharing!
Rodeobull
Posts: 10
Joined: Thu Jan 09, 2014 7:49 pm

Re: Jail time

Post by Rodeobull »

not sharing anything its a question to help me :p
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Re: Jail time

Post by hallsofvallhalla »

Hmm i may have not seen all teh message as it looked like you found a bug and was showing the fix to us, haha sorry.
Post Reply

Return to “General”