Adham Posted September 18, 2017 Share Posted September 18, 2017 سلام عليكم ورحمه الله وبركاته كنت اسوي مود,, وتححقت في سيرفر ان amount اكبر من او تساوي الأكونت داتا بس يجي خطأ كل شوي attempt to compare string with boolean السطر/ if ( getAccountData ( acc, "Mods" ) >= tonumber ( amount ) ) then Link to comment
' A F . Posted September 18, 2017 Share Posted September 18, 2017 حول الاكاونت داتا لـ tonumber Link to comment
^iiEcoo'x_) Posted September 18, 2017 Share Posted September 18, 2017 local Data = getAccountData ( acc , 'Mods' ) if ( Data == 0 ) or ( Data == false ) or ( Data == nil ) then print ( 'Data nil Value' ) else if ( Data >= tonumber ( amount ) ) then -- Code end end Link to comment
Adham Posted September 18, 2017 Author Share Posted September 18, 2017 Just now, #_iMr.[E]coo said: local Data = getAccountData ( acc , 'Mods' ) if ( Data == 0 ) or ( Data == false ) or ( Data == nil ) then print ( 'Data nil Value' ) else if ( Data >= tonumber ( amount ) ) then -- Code end end صار يجي لي data nil value. Link to comment
' A F . Posted September 18, 2017 Share Posted September 18, 2017 local pData = ( type(getAccountData (acc,"Mods")) == "number" and getAccountData(acc,"Mods") or 0 ) ; if ( pDate > 1000 ) then -- Your Code end Link to comment
Adham Posted September 18, 2017 Author Share Posted September 18, 2017 attempt to compare string with nil local acc = getPlayerAccount(source) if not isGuestAccount (acc) then local pData = ( type(getAccountData (acc,"mods")) == "number" and getAccountData(acc,"mods") or 0 ) ; if ( pDate >= amount ) then Link to comment
' A F . Posted September 18, 2017 Share Posted September 18, 2017 سطر 4 pData مو pDate غلطت فيها ماعليش . Link to comment
iyaad Posted September 20, 2017 Share Posted September 20, 2017 On 9/18/2017 at 22:15, Deativated said: اطرح الكود كامل , 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