Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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