Jump to content

Help with Expected player at argument 1, got nil


Kamycz3q

Recommended Posts

Posted

firstly you not need put arugments for player in join because the souce of than even is player enter the server so change it other than that i don't see anything else

Posted
9 minutes ago, Dimos7 said:

firstly you not need put arugments for player in join because the souce of than even is player enter the server so change it other than that i don't see anything else

im new in scripting and i do not understand you. Can you give me edited code pls? 

 

function registerRequest(plr)
    local ip = getPlayerIP(plr)
    local serial = getPlayerSerial
    local nazwa = getPlayerName
    local team = getPlayerTeam
    --local variables
    exports.mysql:_Exec("insert into uzytkownicy(nazwa,ip,serial,team) values (?,?,?,?)",nazwa,ip,serial,team)
end

addEventHandler ( "onPlayerJoin", getRootElement(), registerRequest )

 

Posted
32 minutes ago, Dimos7 said:

just remove from function the player or whatever and left it empty then in code down put source

thx

 

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...