3 registered members (Konsti, AndrewAMD, 1 invisible),
1,376
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
[Anet] I cant Send String
#334788
07/25/10 08:18
07/25/10 08:18
|
Joined: Nov 2009
Posts: 37
XuserTM
OP
Newbie
|
OP
Newbie
Joined: Nov 2009
Posts: 37
|
I can send var but ı cant send_string , Compiler does not show error. I use anet_use_handles(0); because Client and server in separate files I use enet_send_string("datasend",SERVER); for send_string But the server is not any different. İf I use enet_send_var , works well. Warining : Anet is demo.My Client Code
/*
UzakDiyarlar oyununun 3D MMORPG
haline çevrilmesidir.Tüm kullanılan Plugin,Kütüphane ve diğer yazılımların lisanları alınmıştır.
ProjeYönetimi
ByFabs Ve ByXuserTM ye Aitdir.Tüm Hakları Saklıdır.
CLİENT!!!
*/
///////////////////////////////
#include <acknex.h>
#include <default.c>
#include <mtlFX.c>
#include <mtlView.c>
STRING* ip = "127.0.0.1";
///////////////////////////////
#define PRAGMA_PATH "Data";
#define PRAGMA_PATH "Data\\Ses";
#define PRAGMA_PATH "Data\\MDL";
#define PRAGMA_PATH "Data\\2D";
#define PRAGMA_PATH "Data\\Script";
#define PRAGMA_PATH "Data\\Maps";
#define PRAGMA_PATH "Data\\CSKins";
#define PRAGMA_PATH "Data\\AneT";
//Oyunumuz İçin Olan Temel motorları yükliyelim ...
#include "anet.h"
#include "grs.c" // giriş ayarları
var abc = 1646145;
BMAP* fare = "Data\2D\arrow.pcx";
FONT* arial_font = "Arial#20b";
STRING* loginname = "asdasdasdasdasd";
STRING* datasend = "ByXuserTM";
function main()
{
video_window(NULL,NULL,1,"UzakDiyarlar3D");
wait(1);
var abc = 30;
mouse_map = fare;
mouse_mode = 3;
wait(1);
//Login System devreye girsin
anet_set_compatibility(0);
anet_use_handles(0);
enet_init();
enet_clset_event(EVENT_CONNECTED,"baglan_xuser");
enet_clset_event(EVENT_DISCONNECTED,"dc_xuser");
enet_init_client("localhost",2300,"71765564645648632451");
enet_clset_event(EVENT_SYNCHRONIZED,"agbag_xuser");
enet_svset_event(EVENT_SYNCHRONIZED,"agbag_xuser");
enet_svset_event(19,"loginname");
enet_clset_event(19,"loginname");
}
function loginname(var sender, STRING* msg);
{
}
function baglan_xuser(var sender, STRING* msg)
{
enet_ent_synchronize();
}
function dc_xuser(var sender, STRING* msg)
{
}
function agbag_xuser(var sender, STRING* msg)
{
enet_send_var("abc",SERVER);
enet_send_string("datasend",SERVER);
}
My Server Code
/*
UzakDiyarlar oyununun 3D MMORPG
haline çevrilmesidir.Tüm kullanılan Plugin,Kütüphane ve diğer yazılımların lisanları alınmıştır.
ProjeYönetimi
ByFabs Ve ByXuserTM ye Aitdir.Tüm Hakları Saklıdır.
SERVER !!!
*/
///////////////////////////////
#include <acknex.h>
#include <default.c>
#include <mtlFX.c>
#include <mtlView.c>
///////////////////////////////
#define PRAGMA_PATH "Data";
#define PRAGMA_PATH "Data\\Ses";
#define PRAGMA_PATH "Data\\MDL";
#define PRAGMA_PATH "Data\\2D";
#define PRAGMA_PATH "Data\\Script";
#define PRAGMA_PATH "Data\\Maps";
#define PRAGMA_PATH "Data\\CSKins";
STRING* datasend = "#500";
var abc = 0;
FONT* arial_font = "Arial#20b";
//Oyunumuz İçin Olan Temel motorları yükliyelim ...
#include "anet.h" // AneT WinSocK Plugini
#include "ackmysql.h" // mysql kütüphanesi ...
PANEL* aircraft_pan =
{
digits(0,0,4000,arial_font,1,abc);
flags = SHOW;
}
TEXT* log_txt =
{
layer = 1;
pos_x = 100;
pos_y = 100;
font = arial_font;
string (datasend);
flags = CENTER_X | TRANSLUCENT | SHOW;
}
function main()
{
wait(5);
//AneT Server Kuruldu
vec_set(screen_color,vector(255,0,0)); // blue
// anet_set_compatibility(0);
anet_use_handles(0);
ackmysql_init(); // mysql kütüphanesi kuruldu...
enet_init();
enet_svset_event(EVENT_CONNECTED,"baglan_xuser");
enet_svset_event(EVENT_DISCONNECTED,"dc_xuser");
enet_init_server(2300,4,"71765564645648632451");
wait(1);
}
function baglan_xuser(var sender, STRING* msg)
{
}
function dc_xuser(var sender, STRING* msg)
{
}
|
|
|
Re: [Anet] I cant Send String
[Re: XuserTM]
#334877
07/25/10 18:40
07/25/10 18:40
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
Sounds like a bug. I will look into it.
Thanks for reporting.
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
|