Tarek1 Posted January 20, 2017 Share Posted January 20, 2017 (edited) if hoursRequired > tonumber(getElementData(hitPlayer,"OnlineTime.hours")) then exports["TestInfo"]:sendMessage(hitPlayer, "Job: This job requires that you have at least ".. tostring(hoursRequired) .." hours of gameplay.",255,0,0) return end if hoursRequired > tonumber(getElementData(hitPlayer,"OnlineTime.hours")) then EXPORTS["TestInfo"]:sendMessage(hitPlayer, "Job: This job requires that you have at least ".. tostring(hoursRequired) .." hours of gameplay.",255,0,0) return end Error : attempt to compare nil with number Edited January 20, 2017 by Tarek1 Link to comment
N3xT Posted January 21, 2017 Share Posted January 21, 2017 hoursRequired قيمة فارغة ، لذلك هل أنت متأكد أنه فيه قيمة ( ورقم ) ؟ 1 Link to comment
</Mr.Tn6eL> Posted January 21, 2017 Share Posted January 21, 2017 من ترجمة الديبق تفهم ان لايمكن مقارنة رقم مع متغير غير معرف تأكد من هذا الجزء hoursRequired > tonumber(getElementData(hitPlayer,"OnlineTime.hours")) 2 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now