Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,014 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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 | chip programmers | 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