Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (EvanTJ, Grant, AndrewAMD), 7,247 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
confusing semantics #244497
01/05/09 04:54
01/05/09 04:54
Joined: Dec 2008
Posts: 43
D
DavidM Offline OP
Newbie
DavidM  Offline OP
Newbie
D

Joined: Dec 2008
Posts: 43
function testme(char *cnt )
{
STRING TESTING;
str_cpy( &TESTING, cnt );
}

function main()
{
testme( "HELLO" );
}

Can someone tell me why the script crashes at the str_cpy.

-David

Re: confusing semantics [Re: DavidM] #244498
01/05/09 05:13
01/05/09 05:13
Joined: Jan 2006
Posts: 53
New Jersey, USA
J
jimc74 Offline
Junior Member
jimc74  Offline
Junior Member
J

Joined: Jan 2006
Posts: 53
New Jersey, USA
You can look at the commands in help.
I believe that if you are using Lite-C,
then it should be

STRING* testing
str_cpy(testing, cnt);

also, maybe the STRING* should be outside of the
function.

hope that helps...

-Jimc74

Re: confusing semantics [Re: jimc74] #244503
01/05/09 07:11
01/05/09 07:11
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
STRING is an engine object, you can create it by STRRING* mystring="#20"; (and using str_create)

you can write what your string to be instead of #20, if write #sometring, it'll be # amoun t of spaces.

you dont need to take care of the lenght of the string, while you are using str_cpy, and str_cat, it handled by the engine.

Generally(%99.9) engine s own functions are made in way that you dont need to use an "&" and struggle with pointer logic.(unless you want to something else, and...)


3333333333

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