RevTheDev / rewards

Daily rewards for FiveM
Eclipse Public License 2.0
14 stars 6 forks source link

'for' limit must be a number #6

Open gorillatarzan opened 3 years ago

gorillatarzan commented 3 years ago

I am facing a problem on random rewards. only one player can take the reward... and then an error appears ... image any help on this ? Thank you very much!

RevTheDev commented 3 years ago

Please double check the config file in the rewards folder and check the limit is a number also please make sure you haven't renamed the folder

RevTheDev commented 3 years ago

Actually scrap that iv just noticed the unknown error for your MySQL it is a database problem one or more items may be missing from your database or a table is missing double check with you database and the rewards config that the random items it gives are indeed in your items area in your database

gorillatarzan commented 3 years ago

I check all the items and everything is added to sql... I even remove everyhting and i put only water and bread... Only one player can take the reward... after first player get the reward then if another player go , i get this message . please see screenshots. image image

gorillatarzan commented 3 years ago

Screen shot of the line 63 image

RevTheDev commented 3 years ago

If you can try enabling random rewards and see if that works then if it does it might be something to do with the way items are sort but like I say I can't really identify stuff atm as I'm rebuilding my pc

RevTheDev commented 3 years ago

Also the best bet is to probably remove rewards from your server and delete the section for rewards in your server database and redownload the master file of GitHub and run it as is without changing anything add the sql to the database database test it if it still does it then you'll know something is wrong on your server or database

gorillatarzan commented 3 years ago

I put the script as it is ... and i have the same issue

gorillatarzan commented 3 years ago

if i remove the line that is show on the screen shot random is working fine .. but is not getting the chances ... I mean is giving every item with the same percentage random .... So 20 or 50 % is the same for the code... is just giving random image

RevTheDev commented 3 years ago

Have you tried disabling random rewards coz that bit of code is only for the random rewards

gorillatarzan commented 3 years ago

Yes when i remove the random rewards all works perfect … So something is going wrong with the specific line

RevTheDev commented 3 years ago

Okay I'll have a look through

gorillatarzan commented 3 years ago

Ok thank you very much and please inform me for any news :D

RevTheDev commented 3 years ago

just tested it on my test server and its working perfectly i cant get it to duplicate your error

gorillatarzan commented 3 years ago

i dont know what is going wrong... something is going wrong with the table.... i google it a little bit and i can see that the original version have the same issue https://github.com/Elipse458/el_daily_rewards/commit/3e531f96807acff5dd3af2dc9168a0084fc4e726

RevTheDev commented 3 years ago

The only thing I can think of is go into your server and try /restart rewards or try a full server restart and clear your server cache

gorillatarzan commented 3 years ago

I already try it ... nothing... I don't know what is going wrong... Anyway thank you for your time