Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
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 (Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 584 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
Manual suggestion #413699
12/16/12 14:14
12/16/12 14:14
Joined: Jul 2002
Posts: 3,208
Germany
Error014 Offline OP
Expert
Error014  Offline OP
Expert

Joined: Jul 2002
Posts: 3,208
Germany
Hey there!

This is not a mistake or anything in the manual, just a friendly suggestion. I recently had some trouble with this error message:

Quote:

Warning W1553 - Can't create alpha
The texture has no standard content (BMP, PCX, or TGA) and can't be automatically converted to an overlay or alpha texture. This warning is only issued when the warn_level variable is set to 1 or above


The problem was totally on my end (a wrongly set format in bmap_createblack (888)), but it was very difficult to find, since the above doesn't really give a starting point. Consider that for a stupid idiot like me, it might not be obvious what constitutes "standard content" (does bmap_createblack create "standard content"?), and what is necessary for "automatic conversion"?

I had to do a google search bringing me to this topic, which prompted me to do the investigation regarding bmap_blit (which in turn led me to check the different formats).
The whole mess was even more confusing, as I used this bitmap using ent_setskin for an entity that didn't had OVERLAY or TRANSLUCENT set.
What I'm saying is: This problem can be hard to debug. Some direction would be helpful! laugh


Of course I realize that in hindsight, this is an obvious problem, but I'm sure I don't have to tell you that those can still be difficult to make out in larger projects. A sentence like this in the manual would be helpful in providing a starting point.

Quote:

This can happen if you're using a dynamically created bitmap with a wrong format that Acknex does not create an alpha channel for. Check if the bitmap you're trying to display has a format with no alpha channel (such as 888, 565, ...).



~~

I've always liked that you included the "Programming Trouble: FAQ" in the manual (unfortunately a bit hard to find) - I believe thats a great idea especially given Gamestudio's target audience. Perhaps we could have a thread where users can suggest new questions and sections to add to this, so that in cases like the above, the user would know where to start looking?
In that case, the above could also be turned into a new question there.



Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!
Re: Manual suggestion [Re: Error014] #413740
12/17/12 08:17
12/17/12 08:17
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
Thanks, we'll make that more clear in the manual. Please post here also if something in the manual was not outright wrong, but hard to understand.

Re: Manual suggestion [Re: jcl] #414064
12/21/12 19:31
12/21/12 19:31
Joined: Jul 2002
Posts: 3,208
Germany
Error014 Offline OP
Expert
Error014  Offline OP
Expert

Joined: Jul 2002
Posts: 3,208
Germany
Again a suggestion - this is even less of an issue than the above, but I remember having a bit of trouble with this at first, and it's so easily fixed that I'll just suggest it here:

Lite-C apparently cannot automatically convert char to var, which is to say that something like this:

Code:
char mychar;
	mychar = 65; //Ascii for "A"
	str_setchr(mystring,1,mychar);



does not work. Since str_setchr expects the "var" type, even str_setchr(mystring,1,(var) mychar) (which I assume might be something a beginner might try, I believe I did once) would not work. You have to automatically convert to Integer beforehand:

Code:
str_setchr(mystring,1,(int) mychar);



So, none of this is news to you, of course, and it isn't overly difficult. But there's no mention of this need anywhere in the manual (or, if there is, it's too difficult to find).
Personally, I like using "char" instead of "int" if I know that it's enough to save some memory, so I encounter this kind of issue every now and then.

So here's what I suggest: There's a "Variables"-section in the manual, where you give an overview about the different types.
Perhaps you could add something like:

Quote:

Most of Acknex functions expect the var-type - the manual always states what type is expected. Types are automatically converted to var for you, so you usually don't have to worry about this. However, char types are not automatically converted to var - you'll have to convert to int first:

str_setchr(mystring,1,(int) mychartype);




EDIT: Or, who knows, maybe this is a bug (or oversight). Either way, it's now reported, sorry if it's now in the wrong place. laugh

Last edited by Error014; 12/21/12 19:35.

Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!
Re: Manual suggestion [Re: Error014] #414106
12/23/12 08:10
12/23/12 08:10
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
What you found is in fact a missing implicit conversion type. C languages should convert all numeric variables automatically. char -> fixed was just not implemented - we had not noticed it so far. We'll implement it in the next version.

Re: Manual suggestion [Re: jcl] #414149
12/24/12 01:22
12/24/12 01:22
Joined: Jul 2002
Posts: 3,208
Germany
Error014 Offline OP
Expert
Error014  Offline OP
Expert

Joined: Jul 2002
Posts: 3,208
Germany
That's good news, thank you!

Minor thought: Maybe we can avoid some confusion if we add an example to the "casting"-section in the "variables"-part of the manual that actually converts the char 48 (= '0') and gets 48 as a result.
Just an idea - maybe some people who are used to, say, PHP, would get confused if they see their '0's getting converted to something they didn't expect.


Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!

Moderated by  aztec, Inestical, Matt_Coles, Tobias 

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