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 1 of 2 1 2
some problems #109857
01/29/07 21:44
01/29/07 21:44
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
I have some problems when converting my project to Lite-C:

1. The engine crashes without telling me whats wrong when I use 'file_str_read'. I am not sure if I am doing something wrong?
Code:

var filehandle_n;
...
filehandle_n = file_open_game("file.txt");
if(filehandle_n == 0){shutdown(ERROR_FILE);return;}
file_str_read(filehandle_n, temp_string);



2. I have no idea if DLLs work with Lite-C. I initialize then like normal functions, but I still get errors like "cannot convert ARRAY to FIXED". Can I have an example to declare DLL functions in Lite-C, please? Are my DLLs even compatable with Lite-C, they where with A6.50?

Thats about it for now. If I can fix these problems my project will be working nicely (apart from Shaders which I get a message that they are not supported, I guess this is no error, just that Lite-C BETA doesn't support shaders).

Re: some problems [Re: sheefo] #109858
01/29/07 22:23
01/29/07 22:23
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
As to 1), my first guess would be that temp_string is not a STRING. According to my experience all people so far that name their string temp_string have found some creative ways for producing anything but a valid STRING. Can you check?

For DLLs, read the manual:

http://manual.conitec.net/litec_api.htm

And yes, shaders are not supported yet.

Re: some problems [Re: jcl] #109859
01/29/07 22:33
01/29/07 22:33
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
JCL, may I ask you why you are at your office 23:32? Are you in the hot phase of releasing something we donŽt know

Re: some problems [Re: TWO] #109860
01/29/07 22:49
01/29/07 22:49
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
Well, it's in fact 2:50 pm and the sun is shining. It all depends on the time zone .

Re: some problems [Re: jcl] #109861
01/29/07 22:52
01/29/07 22:52
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
Ahh, then a good morning to you, IŽll go to bed

Re: some problems [Re: TWO] #109862
01/30/07 09:24
01/30/07 09:24
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
I have defined temp_string like this "STRING* temp_string = "#1000";" Is this correct?

I am looking into the DLL thingy, thanks jcl.

I noticed another problem, things like "on_p" ... "on_close" don't work any more... whats wrong?


EDIT: I don't know how, but I fixed the 'file_str_read' problem.

Last edited by sheefo; 01/30/07 09:37.
Re: some problems [Re: sheefo] #109863
01/30/07 13:47
01/30/07 13:47
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline
Expert
FoxHound  Offline
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
the "on_p" function needs to be in a function. I think this is shown in the "earthball" demo.


---------------------
There is no signature here.


QUIT LOOKING FOR ONE!
Re: some problems [Re: FoxHound] #109864
01/30/07 14:58
01/30/07 14:58
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
Thanks. It works now.

But how do I use this to point to a function with a parameter without it passing anything? I got a function that needs a STRING* passed to it, but I want to use "on_p = thefunction;" without any parameters? It works with "on_close" the way I want it to, but not "on_p". Why?

Re: some problems [Re: sheefo] #109865
01/30/07 15:38
01/30/07 15:38
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
I found another problem, I cannot use "my.unit_name = str_create(temp_string);". It looks like skills cannot hold strings...? Is there a way to do this?

Re: some problems [Re: sheefo] #109866
01/30/07 15:56
01/30/07 15:56
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
If "unit_name" is a skill: Try

my.unit_name = (var)str_create("...");

Page 1 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