AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Compile Error] (https://forums.alliedmods.net/showthread.php?t=113232)

ProIcons 12-24-2009 16:46

[Compile Error]
 
PHP Code:

public socket_init()
{
    new 
ip[64],port[6],erre[100],user[32],pass[100]
    new 
cmd[300],botcmd[2049]
    
get_cvar_string("bot_host",ip,63)
    
get_cvar_string("bot_port",port,5)
    
get_cvar_string("bot_user",user,31)
    
get_cvar_string("bot_pass",pass,99)
    (
101bothost socket_open(ip,port,SOCKET_TCP,erre)
    
    
format(cmd,299,"USER %s^r^nPASS %s^r^n")
    
socket_send(bothost,cmd,512)
    
socket_recv(bothost,botcmd,2048)
    
socket_read(botcmd)


HTML Code:

//// Gather.sma
// F:\Counter Strike Servers\elajtjumperz\cstrike\addons\amxmodx\Amxx Script\Gather.sma(101) : error 035: argument type mismatch (argument 2)
//


AntiBots 12-24-2009 17:13

Re: [Compile Error]
 
PORT isn't a string..

ProIcons 12-24-2009 17:28

Re: [Compile Error]
 
so what?:S

ProIcons 12-24-2009 17:29

Re: [Compile Error]
 
new ip[64],port,erre[100],user[32],pass[100]
new cmd[300],botcmd[2049]
get_cvar_string("bot_host",ip,63)
port = get_cvar_num("irc_port")
get_cvar_string("bot_user",user,31)
get_cvar_string("bot_pass",pass,99)
bothost = socket_open(ip,port,SOCKET_TCP,erre)

nothing again

ProIcons 12-24-2009 17:34

Re: [Compile Error]
 
(argument 4) Now is the problem

AntiBots 12-24-2009 17:34

Re: [Compile Error]
 
For my work perfect.

Look socket_open
PHP Code:

native socket_open(const _hostname[], _port_protocol SOCKET_TCP, &_error); 


_error is a int ( cell ).

That return this:
* 0 - no error
* 1 - error while creating socket
* 2 - couldn't resolve hostname
* 3 - couldn't connect to given hostname:port


All times are GMT -4. The time now is 04:07.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.