Gamestudio Links
Zorro Links
Newest Posts
No connection to MT4
by JeyKey II. 10/29/26 09:34
Zorro plugin for Hyperliquid.xyz
by opm. 10/28/26 13:50
Icon "OP"
by JeyKey II. 10/27/26 07:03
ZorroGPT
by TipmyPip. 10/26/26 08:09
Chat Room for Zorro Programmers
by Haitao_Ren. 10/25/26 03:14
Trading Journey
by Haitao_Ren. 10/25/26 03:14
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (TipmyPip, JeyKey II), 12,626 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Haitao_Ren, JimSimons, julienp, julienper, KelleyAbbey
19247 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
STRING* parameter #427594
08/10/13 11:07
08/10/13 11:07
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline OP
Serious User
Ch40zzC0d3r  Offline OP
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Hey guys!
Ive got a big problem here frown
So Im using this code (pseuode function):
Code:
function writeString(STRING *strParam)
{
	wait(-1);
	strParam = str_create("test");
}

...

STRING *szRet;
writeString(szRet);
while(szRet == NULL) wait(1);
printf("%s", _chr(szRet));



But the while wont ever break!
I need this for receiving special infos from a sql database...

Re: STRING* parameter [Re: Ch40zzC0d3r] #427595
08/10/13 12:28
08/10/13 12:28
Joined: Sep 2009
Posts: 1,035
Budapest
Aku_Aku Offline
Serious User
Aku_Aku  Offline
Serious User

Joined: Sep 2009
Posts: 1,035
Budapest
Try this.
Instead of strParam = str_create("test"); use strParam = str_create("");
And insert this line:
str_cpy(strParam,"test");

Re: STRING* parameter [Re: Aku_Aku] #427597
08/10/13 12:40
08/10/13 12:40
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline OP
Serious User
Ch40zzC0d3r  Offline OP
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Nope, sorry doesnt work.
I think the parameter pointer gets fucked up anyhow...
If I printf("%X, &strParam) the address before and after the wait is different frown

Last edited by Ch40zzC0d3r; 08/10/13 12:40.
Re: STRING* parameter [Re: Ch40zzC0d3r] #427601
08/10/13 13:46
08/10/13 13:46
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
Code:
function writeString(STRING *strParam)
{
	wait(-1);
	str_cpy(strParam, "hey this works!");
}

...

STRING *szRet = str_create("#256");
str_cpy(szRet, ""); //Set to length 0
writeString(szRet);
while(str_len(szRet) == 0) wait(1);
error(szRet);



Visit my site: www.masterq32.de
Re: STRING* parameter [Re: MasterQ32] #427610
08/10/13 16:11
08/10/13 16:11
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline OP
Serious User
Ch40zzC0d3r  Offline OP
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Thanks youre the best wink
Works perfectly!


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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