Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by Grant. 02/24/26 22:21
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (TipmyPip, clint000, Grant), 6,810 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Passing a String from a DLL to a WDL Script #12419
04/24/03 22:43
04/24/03 22:43

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Hello All,
Anyone know how to pass a string from a dll to a wdl script. I will give you a very simple example. Suppose in a dll function you want to pass a message to the player, say "You are in the dark". I want this displayed in a text entity within a panel that is visible on the screen.

I have reviewed the SDK, but I am afraid I am a bit confused. I have successfully passed a string from a WDL to the DLL. But I am having difficulty going the other direction.

Any help is greatly appreciated.

Thanks,

Re: Passing a String from a DLL to a WDL Script #12420
04/25/03 00:06
04/25/03 00:06
Joined: Mar 2002
Posts: 801
Switzerland, Zürich
napo Offline
Developer
napo  Offline
Developer

Joined: Mar 2002
Posts: 801
Switzerland, Zürich
Passing a string from a DLL to a WDL Script:
quote:

long PSTRING(char* chars)
{
static A4_STRING tempstring;
static char tempname[80];
strcpy(tempname,chars);
tempstring.chars = tempname;
return (long)&tempstring;
}

DLLFUNC fixed WriteSomething()
{
return PSTRING("You are in the dark");
}

Passing a String from a WDL Script to a DLL:

quote:

char* Long2Char(long long_)
{
A4_STRING *temp = (A4_STRING *) long_;
return temp->chars;
}

DLLFUNC fixed WriteSomething(long mystring)
{
char* MyString = Long2Char(mystring);
....
}



Re: Passing a String from a DLL to a WDL Script #12421
04/25/03 00:30
04/25/03 00:30

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Thanks for the information, I will test it out!

Re: Passing a String from a DLL to a WDL Script #12422
04/25/03 01:25
04/25/03 01:25
Joined: Mar 2002
Posts: 801
Switzerland, Zürich
napo Offline
Developer
napo  Offline
Developer

Joined: Mar 2002
Posts: 801
Switzerland, Zürich
np
BTW you posted in the wrong forum, "Higher Languages" is the good one


Moderated by  HeelX, Spirit 

Gamestudio download | 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