Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,268 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
GSTNet and Lite-C #172446
12/12/07 00:27
12/12/07 00:27
Joined: Jul 2004
Posts: 40
UK
M
Macro Offline OP
Newbie
Macro  Offline OP
Newbie
M

Joined: Jul 2004
Posts: 40
UK
Hey,

I am trying to get GSTNet working in A7 with Lite-C

I am running into problems converting the wdl file that comes with it into Lite-C and making it work.

Has anybody managed to do this and if so would they be willing to provide some pointers to pitfalls that they encountered. Obviously a complete working .h file would be totally awesome but as asking for that is rather cheekey any help would be great

My converted code does compile but then I get a "this program has encountered an error and needs to close" box of death which I assume is an unhandled exception. This occurs on trying to call GSTNet_ServerInit(port);

I have renamed the GSTNet.wdl file to GSTNet.h and included it into my test program.

I have had a go at changing the code in the GSTNet file to the Lite-C standard and while it compiles it is more than likly that I have messed that up somwhere.

The prorotype for the GSTNet ServerInit(port) function has been changed...

Code:

from...

dllfunction GSTNet_ServerInit(port);

to...

function GSTNet_ServerInit(int port);




Is this the problem?, has changing the argument to int caused the issue?? I have played with what I can think to change so any suggestions would be great

Cheers

MACRO

Re: GSTNet and Lite-C [Re: Macro] #172447
12/12/07 00:52
12/12/07 00:52
Joined: Jul 2004
Posts: 40
UK
M
Macro Offline OP
Newbie
Macro  Offline OP
Newbie
M

Joined: Jul 2004
Posts: 40
UK
Ok so I may have narrowed this down a bit.

I have put together this ultra simple test file "test.c"...

Code:

#include <acknex.h>
#include <default.c>

function GSTNet_ServerInit(int port);
function GSTNet_Connection();

void main()
{
level_load("test.wmb");

wait (3);

ent_create("..\\ASSETS\\MODELS\\mig.mdl", vector(0, 0, 0), NULL);


GSTNet_ServerInit(15152);

while(GSTNet_Connection() == 0)
{
wait(1);
}
}



And it crashes on load with the "This program has encountered a problem ..." box of death.

I believe this is down to one of three things...

1) The dll is never being loaded (perhaps I missed a step??).

2) The function prototype is incorrect and so it cant find the function to call or is passing it the wrong datatypes.

3) The dll itself requires some modification to work (unlikley).

Any ideas??

Cheers

MACRO

Re: GSTNet and Lite-C [Re: Macro] #172448
12/12/07 19:56
12/12/07 19:56
Joined: Jun 2001
Posts: 1,004
Dossenbach
N
nfs42 Offline
Serious User
nfs42  Offline
Serious User
N

Joined: Jun 2001
Posts: 1,004
Dossenbach
1) The dll is never being loaded (perhaps I missed a step??).

>try starting with command line parameter -diag and post your acklog.txt

2) The function prototype is incorrect and so it cant find the function to call or is passing it the wrong datatypes.
>function GSTNet_ServerInit(var port); // don't know if lite-c supports it

3) The dll itself requires some modification to work (unlikley).
>migration to lite-c will start in feb 2008


Andreas
GSTools - Home of
GSTScript 0.9.8: lua scripting for A6/7/8
GSTNet 0.7.9.20: network plugin for A6/7/8
GSTsqlite 1.3.7: sql database plugin for A6/7/8
3DGS Codebase: 57 snippets || 3DGS Downloads: 248 files
Re: GSTNet and Lite-C [Re: nfs42] #172449
12/14/07 00:07
12/14/07 00:07
Joined: Jul 2004
Posts: 40
UK
M
Macro Offline OP
Newbie
Macro  Offline OP
Newbie
M

Joined: Jul 2004
Posts: 40
UK
I have looked into this further and it is not loading the GSTNet.dll file.

It is not listed as being loaded in the log file so I assume it isn't being loaded.

I wrote a test plugin dll to validate the dll loading and that loads just fine so I assume it is somthing with the dll or the version I have of it.

Extract from log...

Code:

...
DI Microsoft PC-joystick driver 4 axes 12 buttons initialized
Mouse found
Joystick found
SB X-Fi Audio [7C00] opened
NVIDIA GeForce 7950 GX2 pure T&L device 1ff9 detected
D3D device NVIDIA GeForce 7950 GX2 1ff9 selected..
PATH C:\Projects\code\
ClassTest.dll opened
Compiling TEST.C.... .... . ..
Running TEST.C.
4 objects
...



ClassTest is my test dll file. The functions I defined in ClassTest work perfectly. The dll files (both my test one and the GSTNet one) reside in the acknex_plugins folder of my 3DGS install.

Any ideas??

Cheers

MACRO


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1