Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by AndrewAMD. 12/05/23 10:56
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip, Quad), 622 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: char* to char* [Re: jcl] #112945
02/21/07 20:06
02/21/07 20:06
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
Thanks jcl, I could never turn down advice from you. I will take a look through every C reference/tutorial, starting with the ones your recomended.

I do have experience with complicated programming, but only using a scripting language called Ruby. Its syntax is so different than C. Variables can be defined using "$" at the beginning of the name for a global variable, "@" for a local, "@@" for a class (unique to Ruby) and nothing for a instant variable. It doesn't use "{" and "}", instead it uses only the keyword 'end'.

Anyway, I will shut up now. But I had this problem with plugins, until I found 'strcpy' and that was the solution. Since it is not avaliable in Lite-C I cannot proceed.

Can it be added using the API stuff I hear so much about? If so... can you show me how?

Re: char* to char* [Re: sheefo] #112946
02/21/07 20:29
02/21/07 20:29
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
Ömm, I wrote an A6 mp plugin, helped at cebas outbugging the f-render and now I finished more or less half of my engine, my litte baby

But you are right, what a noob mistake The second pointer gets filled with the value of the first char. But I thought you wanted this Just kidding...

Re: char* to char* [Re: TWO] #112947
02/21/07 21:58
02/21/07 21:58
Joined: Apr 2006
Posts: 136
San Francisco
T
Tor Offline
Member
Tor  Offline
Member
T

Joined: Apr 2006
Posts: 136
San Francisco
Whenever you get garbage characters it usually means that the pointer was not initialized only contains null/garbage data (usually that weird looking i thing).

Make sure you set the pointer to something firsT!


"Towlie, you're the worst character ever." I know...
Re: char* to char* [Re: Tor] #112948
03/02/07 20:30
03/02/07 20:30
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
I did it! I hope it helps someone.

You can add more like this:

Code:

#include <string.h>
void* __cdecl strcpy(char*, char*);
void* __cdecl strcat(char*, char*);



Page 2 of 2 1 2

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