Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 3,464 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 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