Jump to content

what is the problem


top sniper

Recommended Posts

Posted

what is the problem with this code ?

function redirect() 
     redirectPlayer(source, "178.33.90.184", 20002) 
end 
addEventHandler("onPlayerJoin", root, redirect) 
  

==================================================================

~|منٌ رأيّتُموِۂ يّعتُدُيّ على عرض فُتُٱة مؤمنٌة فُٱسًحًقَوِوِوِوِوِوِوِة|~

134479106051.png

==================================================================

Posted

FatalTerror, it has an error.

20002 must be in a string mode.

local ip = "178.33.90.184" 
local port = "20002" 
local root = getRootElement() 
  
addEventHandler("onPlayerJoin", root, 
function() 
     redirectPlayer(source, ip, port) 
end) 

If I helped you, please click the like button on the right ;) Thanks!

Posted

Wrong, myonlake.

bool redirectPlayer ( player thePlayer, string serverIP, int serverPort, [ string serverPassword ]

Port must be in a integer only.

Ingame nick: Cadu12

Posted
Cadu12 said:
Wrong, myonlake.

bool redirectPlayer ( player thePlayer, string serverIP, int serverPort, [ string serverPassword ]

Port must be in a integer only.

Cool, well, my server works just fine with string port.

If I helped you, please click the like button on the right ;) Thanks!

Posted
  
function redirect() 
     redirectPlayer(source, "178.33.90.184", tonumber(20002)) 
end 
addEventHandler("onPlayerJoin", root, redirect) 
  
  

ING : [xXx]~Al3grab

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