Jump to content

A little help please


mint3d

Recommended Posts

Posted

Okay so I came across the old MTA Paradise script and I started to play around with it and look into it, so I then decided lets try actually run it and see what happens, it's giving me an error which is;

registration.lua:60: attempt to call global 'sha1' (a nil value)

This refers to this piece of code;

if exports.sql:query_free( "INSERT INTO wcf1_user (username,salt,password) VALUES ('%s', '%s', SHA1(CONCAT('%s', SHA1(CONCAT('%s', '" .. sha1( password ) .. "')))))", username, salt, salt, salt ) then 
                             

Anyone able to explain to me what the problems is and any solution to fix it?

Thanks for reading!

Skype: Jordan_Nymph

Posted

The error is telling you that 'sha1' is not a known thing. Most likely it's because sha1 isn't a function in your script. As an easy thing to do, you can just download the most known sha1 library out there made by kikito on Github.

https://github.com/kikito/sha1.lua/blob/master/sha1.lua

Make sure the script can access the file and it's able to use the function.

logo-small.png?v=3 tiny-sapdfr.png

 

If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]

  • 1 year later...
Posted

Good, I have the same error, I have put the code that you have previously passed, and I have put it in the players folder. But it still does not work, I do not know what to do.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...