ANet Problem

Posted By: xDoug

ANet Problem - 08/27/09 21:50

I didn't see this section in the forum, so I will ask the same question I did in the gamestudio for beginners.

I downloaded the ANet example, and I'm trying to create a Multiplayer Game.
However when I compile my main.c, I get the following error:

Error in mp.c line 189

ptr_remove undeclared identifier

if(ptr_for_handle(players[i].skill[40]!=0{ptr_remove(ptr_for_handle(players[i].skill[40]))
}


Thanks
Posted By: Widi

Re: ANet Problem - 08/27/09 22:09

Don`t make doubleposts !!!!!!!!!!!!!!!
Posted By: Dark_samurai

Re: ANet Problem - 08/28/09 06:55

What gamestudio version do you have? Which example do you mean, the 3d chat example?
Posted By: Germanunkol

Re: ANet Problem - 08/28/09 07:44

I don't think you need handles at all. A pointer can be stored directly in a skill:

you = ent_create(...);

players[myClientID].skill[40] = you;

later on:

you = players[myClientID].skill[40];
if(you) ptr_remove(you);
players[myClientID].skill[40] = 0;
Posted By: Fisch

Re: ANet Problem - 09/01/09 09:10

I have another problem. I got the free-version of ANet and wrote a little application.
When I test it in SED it works fine.
But running the published EXE-File, I get no connection.
Can you please help me?
Posted By: Hand_Of_Law

Re: ANet Problem - 09/01/09 11:22

Originally Posted By: Fisch
I have another problem. I got the free-version of ANet and wrote a little application.
When I test it in SED it works fine.
But running the published EXE-File, I get no connection.
Can you please help me?

Make sure that the anet.dll and the key file are in the directory of the exe file. They are not added standard by the publish function.
Also ensure that no firewall is blocking.
Posted By: Fisch

Re: ANet Problem - 09/01/09 12:09

Thank you, but when I copy ANet.dll in the same folder and execute the EXE-File,
it closes itself immidiately after starting.
I have no key.dll, because its only the Demo.
The simple 3D chat example is working.

Don't understand it!
Posted By: Dark_samurai

Re: ANet Problem - 09/01/09 14:30

Then you have done something wrong. Try to run the script in SED again. If it is working, do a publish and copy the anet.dll into the folder that was created through the publish function.
Posted By: Fisch

Re: ANet Problem - 09/01/09 15:13

When I copy the DLL in the folder and start the game,
I see a black window for less than a second and the game shuts down with an error-sound.
I made a small video of the problem:
anet_problem.flv

Thank you.
Posted By: Hand_Of_Law

Re: ANet Problem - 09/01/09 17:27

A wild guess, but could it bee that a splash image which should be loaded on entry is missing ?
Posted By: Fisch

Re: ANet Problem - 09/02/09 07:35

This might be the problem. blush
I'll test it out. Thanks!
Posted By: Dark_samurai

Re: ANet Problem - 09/02/09 09:09

Start the .exe with the -diag commandline. I think if files are missing it will be written into the acklog.txt.
Posted By: Fisch

Re: ANet Problem - 09/02/09 10:34

No, when I load a level, made a wait(). At the following enet_init() the application ends as ever before. cry
Do I have to set something before enet_init()?
Posted By: Dark_samurai

Re: ANet Problem - 09/02/09 10:41

Try to make an application that only does the following:

Code:
function main()
{
wait(1);
enet_init();
error("It's working");
}



Run the code in SED. If an error message with "It's working" appears, publish and add anet.dll and then try to run the .exe. Then tell me the result.

If it's not working also post the acklog.txt please.
Posted By: Fisch

Re: ANet Problem - 09/02/09 10:44

In the logfile the program aborts after showing the ANet-Screen(in exe-file; in SED its working!).

Here the acklog.txt:
Click to reveal..
Log of A7 Engine 7.06.1 run at Wed Sep 02 12:38:45 2009
Fisch on Windows NT/2000/XP version 6.1 Build 7100
Options -diag

App C:\Users\Fisch\Desktop\Test\main.cd\main.exe in C:\Users\Fisch\
MM mixer opened
DSOUND device opened
DI interface opened
Start Window opened
(c)Conitec . Dieburg . San Diego . www.3dgamestudio.com
A7 Engine - Pro Edition V7.06.1 - Sep 30 2007

Mouse found
Lautsprecher (Realtek High Definition Audio) opened
Radeon X1650 Series (Microsoft Corporation - WDDM) pure T&L device 1ff9 detected
D3D device Radeon X1650 Series (Microsoft Corporation - WDDM) 1ff9 selected
Compiling MAIN.WDL - [Esc] to abort....
ANet.dll opened
Running MAIN.WDL.
3 objects
D3D_Init Window: 1280x1024x1244764 -> Window: 1x1280x1024x32
Video memory found: 501 MB
Main started
anet_main_loop started
Main loop.....
Level(splash.wmb)...cmap,0 ents,42 verts,0 lmaps,4 texs,40 faces,pvs,hull
Physics restarted...ok....ok
1st frame - 513024K... ok
---------------------------
|ANet-MPPlugin Demo|
---------------------------

You are NOT ALLOWED to use this demo in any commercial ways or for commercial projects!
Visit: www.ANet-Plugin.com

(c) Peter Soxberger - any key to abort
Program aborted
Close level,DLL,objects
Free input,funcs,panels,defs,syns,views,strings,vars..ok
Free sounds,bmaps,fonts,hash,defs1,script..ok
Close dx,multimedia,D3D,engine,physics,nexus..ok
A7 Engine - Pro Edition V7.06.1 - Sep 30 2007
(c)Conitec . Dieburg . San Diego . www.3dgamestudio.com
Close window

Posted By: Dark_samurai

Re: ANet Problem - 09/02/09 10:52

Try that:

Quote:

var testvar;

function main()
{
wait(1);
enet_send_var(_str("testvar"),BROADCAST);
}


ANet should give an error like that: "ANet-DLL: Error in enet_send_var! Bad ClientID!".
Tell me if this error is also shown when you run the .exe. (Please post the acklog.txt again)

I also need to know your GS Version and Edition and the ANet Version you are using.
Posted By: Fisch

Re: ANet Problem - 09/02/09 11:00

I'm usingA7.06 Commercial and ANet Demo 1.2.4.3.
Running your code in SED I get "ANet-DLL: Error in enet_send_var! No connection established.", as exe there is no error.
Acklog.txt:
Click to reveal..
Log of A7 Engine 7.06.1 run at Wed Sep 02 12:56:46 2009
Fisch on Windows NT/2000/XP version 6.1 Build 7100
Options -diag

App C:\Users\Fisch\Desktop\Test\main.cd\main.exe in C:\Users\Fisch\
MM mixer opened
DSOUND device opened
DI interface opened
Start Window opened
(c)Conitec . Dieburg . San Diego . www.3dgamestudio.com
A7 Engine - Pro Edition V7.06.1 - Sep 30 2007

Mouse found
Lautsprecher (Realtek High Definition Audio) opened
Radeon X1650 Series (Microsoft Corporation - WDDM) pure T&L device 1ff9 detected
D3D device Radeon X1650 Series (Microsoft Corporation - WDDM) 1ff9 selected
Compiling MAIN.WDL - [Esc] to abort....
ANet.dll opened
Running MAIN.WDL.
3 objects
D3D_Init Window: 1280x1024x1244764 -> Window: 1x1280x1024x32
Video memory found: 501 MB
Main started
anet_main_loop started
Main loop.........ok
1st frame - 513024K.. ok
ANet-DLL: Error in enet_send_var!
No connection established! - any key to abort
Program aborted
Close level,DLL,objects
Free input,funcs,panels,defs,syns,views,strings,vars..ok
Free sounds,bmaps,fonts,hash,defs1,script..ok
Close dx,multimedia,D3D,engine,physics,nexus..ok
A7 Engine - Pro Edition V7.06.1 - Sep 30 2007
(c)Conitec . Dieburg . San Diego . www.3dgamestudio.com
Close window

Posted By: Fisch

Re: ANet Problem - 09/02/09 11:05

Do you think it might be because of my Windows 7? I'll test it on XP on VirtualBox.
Posted By: Dark_samurai

Re: ANet Problem - 09/02/09 11:06

This is the acklog.txt when you started in SED. Post the one that was created when running the .exe.

Anyway you should update your Gamestudio version to A7.80 (you get this free update on the gamestudio downloadside).
Posted By: Dark_samurai

Re: ANet Problem - 09/02/09 11:08

Yes but it seems like gamestudio can't load the plugin correctly because it's not possible to call any function of the plugin. The Gamestudio version you are using is very old and was never tested under Win7. Maybe the new one runs better under Windows7 and maybe also this "bug" disappears then.
Posted By: Fisch

Re: ANet Problem - 09/02/09 11:15

I will do what you recommended to me. Thank you very much. You'll here from me, when its working.
Posted By: Fisch

Re: ANet Problem - 09/02/09 13:40

Thank you very much! I ever thought it would be unnecessary to update. crazy
Now it works fine.
Posted By: Dark_samurai

Re: ANet Problem - 09/02/09 13:54

Nice to hear! laugh
© 2024 lite-C Forums