Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, AndrewAMD), 877 guests, and 5 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
Trying to Display Text on Screen #236261
11/13/08 04:44
11/13/08 04:44
Joined: Jul 2007
Posts: 48
M
MattyTheG Offline OP
Newbie
MattyTheG  Offline OP
Newbie
M

Joined: Jul 2007
Posts: 48
Hello, I'm trying to display a score on the screen and I can't figure out a way to display text. I tried using digits(x,y,etc...) like the help says but I keep getting syntax errors. I tried putting it into a PANEL* and copied the code right out of Lite-C Workshops and it didn't run either.

If anyone could help, that would be great.

Re: Trying to Display Text on Screen [Re: MattyTheG] #236262
11/13/08 04:53
11/13/08 04:53
Joined: Oct 2008
Posts: 218
Nashua NH
heinekenbottle Offline
Member
heinekenbottle  Offline
Member

Joined: Oct 2008
Posts: 218
Nashua NH
Code:
PANEL* scorePan =
{
	digits(300,10,"Score %f",Arial#15,1,score);
	flags = VISIBLE;
}


copied and pasted straight from my script, so no reason why it won't work.

Just remember a few things, PANELs are pointers, thus the asterisk. There is an "=" after the panel name. I know I just spent a good 5 minutes wondering why my digit panel wasn't working only to find that asterisk was missing.


I was once Anonymous_Alcoholic.

Code Breakpoint;
Re: Trying to Display Text on Screen [Re: heinekenbottle] #236263
11/13/08 05:04
11/13/08 05:04
Joined: Jul 2007
Posts: 48
M
MattyTheG Offline OP
Newbie
MattyTheG  Offline OP
Newbie
M

Joined: Jul 2007
Posts: 48
Yea I have a code that is pretty much exactly like that but I copied and pasted yours just to be safe and I still can't build it.

Parameter unknown PANEL* bad keyword in {}
Parameter unknown digits bad keyword in {}

Re: Trying to Display Text on Screen [Re: MattyTheG] #236264
11/13/08 06:12
11/13/08 06:12
Joined: Oct 2008
Posts: 218
Nashua NH
heinekenbottle Offline
Member
heinekenbottle  Offline
Member

Joined: Oct 2008
Posts: 218
Nashua NH
do you have acknex.h included in your script?


I was once Anonymous_Alcoholic.

Code Breakpoint;
Re: Trying to Display Text on Screen [Re: heinekenbottle] #236311
11/13/08 15:15
11/13/08 15:15
Joined: Nov 2007
Posts: 58
austria
nsksleeper Offline
Junior Member
nsksleeper  Offline
Junior Member

Joined: Nov 2007
Posts: 58
austria
check that:

go to DEBUG->Set corent to main


visit www.nsk-austria.org and vote for sleeper by clansman of the year.

and also look at www.break.com/index/lightningstrikescar.html
Re: Trying to Display Text on Screen [Re: nsksleeper] #236326
11/13/08 17:24
11/13/08 17:24
Joined: Jul 2007
Posts: 48
M
MattyTheG Offline OP
Newbie
MattyTheG  Offline OP
Newbie
M

Joined: Jul 2007
Posts: 48
Yes I have

#include <acknex.h>
#include <default.c>

as my header, I checked that right after I copied the code above to make sure I had the right includes.

Also changing the DEBUG-> set current to main didn't help any frown I tried running debug mode but it just gives me the same build error as above.

Thanks for trying though. I have been in and out of gamestudio for like 4 months and never once have I been able to successfully put text on the screen. Perhaps my acknex.h is damaged?

Re: Trying to Display Text on Screen [Re: MattyTheG] #236333
11/13/08 17:40
11/13/08 17:40
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Make sure you saved your file as .c file and NOT as .wdl file.


Always learn from history, to be sure you make the same mistakes again...
Re: Trying to Display Text on Screen [Re: Uhrwerk] #236338
11/13/08 17:51
11/13/08 17:51
Joined: Jul 2007
Posts: 48
M
MattyTheG Offline OP
Newbie
MattyTheG  Offline OP
Newbie
M

Joined: Jul 2007
Posts: 48
Hmm I tried that but then I just got a bunch of syntax errors for the physics engine and the wait function and event_entity.

Perhaps I have confused two syntaxes and unknowingly put them both into one file so some work as .wdl and others work in .c

Guess I will have to look into that more.


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