Gamestudio Links
Zorro Links
Newest Posts
contractUpdate() is filtering if >2 rows
by mistery. 12/04/26 19:03
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
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 1,998 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Code Conversion #374453
06/18/11 19:57
06/18/11 19:57
Joined: Aug 2002
Posts: 673
Las Cruces, NM
JimFox Offline OP
User
JimFox  Offline OP
User

Joined: Aug 2002
Posts: 673
Las Cruces, NM
Hello,
I have a piece of old code (C-Script) with the following command:

string is_sNpcLine[10000];

I can easily put it into Lite C as:
STRING* is_sNpcLine[10000];

But I have a sneaking feeling that the old code was intending to allocate a string of 10000 characters, not an array of 10000 pointers. If that was the case, then I should do this:
STRING* is_sNpcLine(#10000);

Does anyone remember the old C-script syntax well enough to say what the code represented?
Thanks for your help!!


Jim
Re: Code Conversion [Re: JimFox] #374457
06/18/11 21:56
06/18/11 21:56
Joined: Feb 2011
Posts: 135
Myrkling Offline
Member
Myrkling  Offline
Member

Joined: Feb 2011
Posts: 135
Quote:
But I have a sneaking feeling that the old code was intending to allocate a string of 10000 characters, not an array of 10000 pointers.

Yep, you're right: In C-Script this will create a string with 10000 characters.

Actually string arrays are not possible in C-Script (unless you use a TEXT).

Re: Code Conversion [Re: Myrkling] #374497
06/19/11 13:12
06/19/11 13:12
Joined: May 2008
Posts: 257
D
djfeeler Offline
Member
djfeeler  Offline
Member
D

Joined: May 2008
Posts: 257
Hello,

if you want to allocate 10,000 characters in lite c must be :

Code:
STRING* is_sNpcLine = "#10000";



djfeeler

Last edited by djfeeler; 06/19/11 13:13.
Re: Code Conversion [Re: Myrkling] #374638
06/20/11 16:55
06/20/11 16:55
Joined: Aug 2002
Posts: 673
Las Cruces, NM
JimFox Offline OP
User
JimFox  Offline OP
User

Joined: Aug 2002
Posts: 673
Las Cruces, NM
OK, thanks everyone. That helps a lot. I will correct the code as you indicated.
Regards,


Jim

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