Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 770 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Gamestudio 8.47 [Re: Superku] #458395
03/07/16 22:37
03/07/16 22:37
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: Superku
I really don't like that thing of not writing type information but AFAIK all parameters without type are expected to be/ treated as var, as well as the "function" keyword itself (or is it void?). So that should be fine I guess.


function is an alias for var, so the return type is there. Anyway, not declaring a type is something that was legal in K&R C and up to C89, looked something like this:

Code:
void foo(x)
    int bar;
{}



It's no longer valid since C99, for very obvious and good reasons. You can ommit the name though, and write something like "void foo(int, char*)". BSD is infamous for having type signatures like that. Imho everyone who is into the UNIX philosophy of using the least amount of characters to write a function declaration should be stoned, but nobody is asking me who should be stoned anymore these days (but seriously, who is expected to understand "void strncat(char*,const char*, size_t)" without looking it up?!)

So yeah, no, not legal. However, since we are at the topic of C quirkiness, anyone want to take a guess what the difference between these two is?

Code:
void foo();
void bar(void);



Answer:
Click to reveal..

The first one will accept ANY argument, you can call it with as many arbitrary arguments you want. The second one doesn't accept any. C++ did away with that insanity, also for good and obvious reasons.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Gamestudio 8.47 [Re: WretchedSid] #458399
03/08/16 06:42
03/08/16 06:42
Joined: Nov 2005
Posts: 204
Bavaria
HellThunder Offline
Member
HellThunder  Offline
Member

Joined: Nov 2005
Posts: 204
Bavaria
Tried one of my scripts which is using mtlFX.c and got this.

I'm using Lite-C Free.


Create your own JRPG and join our community: https://www.yrpgtoolkit.com
Re: Gamestudio 8.47 [Re: WretchedSid] #458400
03/08/16 08:10
03/08/16 08:10
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline
Serious User
pegamode  Offline
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Originally Posted By: WretchedSid
Originally Posted By: Superku
I really don't like that thing of not writing type information but AFAIK all parameters without type are expected to be/ treated as var, as well as the "function" keyword itself (or is it void?). So that should be fine I guess.


function is an alias for var, so the return type is there. Anyway, not declaring a type is something that was legal in K&R C and up to C89, looked something like this:

Code:
void foo(x)
    int bar;
{}



It's no longer valid since C99, for very obvious and good reasons. You can ommit the name though, and write something like "void foo(int, char*)". BSD is infamous for having type signatures like that. Imho everyone who is into the UNIX philosophy of using the least amount of characters to write a function declaration should be stoned, but nobody is asking me who should be stoned anymore these days (but seriously, who is expected to understand "void strncat(char*,const char*, size_t)" without looking it up?!)

So yeah, no, not legal. However, since we are at the topic of C quirkiness, anyone want to take a guess what the difference between these two is?

Code:
void foo();
void bar(void);



Answer:
Click to reveal..

The first one will accept ANY argument, you can call it with as many arbitrary arguments you want. The second one doesn't accept any. C++ did away with that insanity, also for good and obvious reasons.


I use this plugin with this kind of function prototypes since 2008 without any problem ... until now. So there must have been a change with this version or accessing external plugins via dll isn't possible with an open beta version at all?

Re: Gamestudio 8.47 [Re: pegamode] #458401
03/08/16 09:17
03/08/16 09:17
Joined: Jul 2004
Posts: 785
Serbia
Iglarion Offline
User
Iglarion  Offline
User

Joined: Jul 2004
Posts: 785
Serbia
Thanks for update!
Btw, i got same error like HellThunder.


IGRAVISION Page - www.igravision.com
RPG project - The Battle For Forgol 92.75%
Re: Gamestudio 8.47 [Re: Iglarion] #458410
03/08/16 16:57
03/08/16 16:57
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes, the error is caused by functions with no parameter types. This is not intended, so I'll upload a new version tomorrow with the old compiler behavior.

Re: Gamestudio 8.47 [Re: pegamode] #458419
03/08/16 20:59
03/08/16 20:59
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: pegamode

I use this plugin with this kind of function prototypes since 2008 without any problem ... until now. So there must have been a change with this version or accessing external plugins via dll isn't possible with an open beta version at all?

I was mostly trying to say why the code shouldn't have compiled in the first place. If I may ask, why don't you provide type information? The type will default to int, which may or may not be the size of a pointer (most likely it will be on a 32 bit system), but the type int is only guaranteed to be at least 2 bytes. Same with using function, var is not really a type meant for holding pointers. Just because everyone does it, doesn't meant everyone should!


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Gamestudio 8.47 [Re: WretchedSid] #458423
03/09/16 08:16
03/09/16 08:16
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline
Serious User
pegamode  Offline
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Originally Posted By: WretchedSid
Originally Posted By: pegamode

I use this plugin with this kind of function prototypes since 2008 without any problem ... until now. So there must have been a change with this version or accessing external plugins via dll isn't possible with an open beta version at all?

I was mostly trying to say why the code shouldn't have compiled in the first place. If I may ask, why don't you provide type information? The type will default to int, which may or may not be the size of a pointer (most likely it will be on a 32 bit system), but the type int is only guaranteed to be at least 2 bytes. Same with using function, var is not really a type meant for holding pointers. Just because everyone does it, doesn't meant everyone should!


I guess the reason was the example in the manual:

Quote:


Using the DLL in C-Script and lite-C

...

In lite-C it's just a normal prototype (and you can use other variable types than var), in C-Script we need a special dllfunction declaration:

dllfunction ldexpc(x,n); // declaration of a DLL function in C-Script
function ldexpc(x,n); // declaration of a DLL function in lite-C



I also assumed that the default type is var not int.

Re: Gamestudio 8.47 [Re: pegamode] #458431
03/09/16 13:11
03/09/16 13:11
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
This is the new version with no error message for missing argument types:

http://server.conitec.net/down/gstudio_8471.exe

Re: Gamestudio 8.47 [Re: jcl] #458432
03/09/16 13:56
03/09/16 13:56
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline
Serious User
pegamode  Offline
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Everything's running fine now ... engine crash is gone and missing argument types are no problem anymore.

I'll do some further tests this evening.

Re: Gamestudio 8.47 [Re: pegamode] #458472
03/12/16 10:41
03/12/16 10:41
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Was there something changed with MED (highly unlikely, I know)?
Since the patch MED crashes every now and then on some bone operations, like trying to move a bone. The last MED crash before that was many years ago.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Page 2 of 3 1 2 3

Moderated by  Matt_Coles 

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