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
3 registered members (TipmyPip, AndrewAMD, dBc), 18,430 guests, and 6 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
str_cpy() in Lite-C? I'm going nuts! #265449
05/12/09 15:16
05/12/09 15:16
Joined: Sep 2003
Posts: 208
Michael_McCrickard Offline OP
Member
Michael_McCrickard  Offline OP
Member

Joined: Sep 2003
Posts: 208
Can anyone tell me why I can't make str_cpy() work in Lite-C? I never had any troubles with it in C-Script.

Here's my entire program:

////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
/////////////////////////////////////////////////////////////////////

STRING* s;
STRING* s2;

function main()
{
video_mode = 7;
screen_color.blue = 150;

//this one gives an error
str_cpy(s, "test");

//this one also gives an error
//str_cpy(s, s2);
}

Re: str_cpy() in Lite-C? I'm going nuts! [Re: Michael_McCrickard] #265454
05/12/09 15:25
05/12/09 15:25
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
STRING* s = "";
STRING* s2 = "";

You have to define the string Pointer with "=" before you can copy something into it.

Last edited by Widi; 05/12/09 15:25.
Re: str_cpy() in Lite-C? I'm going nuts! [Re: Widi] #265455
05/12/09 15:30
05/12/09 15:30
Joined: Sep 2003
Posts: 208
Michael_McCrickard Offline OP
Member
Michael_McCrickard  Offline OP
Member

Joined: Sep 2003
Posts: 208
Hey, thanks a lot! That was exactly the problem, of course. This Lite-C stuff makes me feel like a real noob ...


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