Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
4 registered members (fogman, Grant, AndrewAMD, juanex), 989 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Panels - using Lite-C Free #273213
06/22/09 02:43
06/22/09 02:43
Joined: Jun 2009
Posts: 4
Sheffield (England)
Onlydying Offline OP
Guest
Onlydying  Offline OP
Guest

Joined: Jun 2009
Posts: 4
Sheffield (England)
Hi i really need help with panels using Lite-C free edition. i am a begginner programmer so pleas dont throw random code at me i really want to try get my head around everything best i can smile

erm ok so the problem im having is that although in the past i have used c-script and created panels with ease i just cant do it in lite-c. ill give you an example of a piece of code i used to do:

bmap random_image = "random_image.bmp";

panel random_panel
{
bmap = random_image;
layer = 1;
flags = overlay, visible;
}

function main()
{
level_load("level1.wmb";
wait(3);
sleep(10);
random_panel.visible = off;
sleep(10);
random_panel.visible = on;
}

so thats easy enough (hopefully that code is right just did it off top of my head).

but with lite-c im having to do this:

PANEL first_pan = // why is there an "=" sign?
{
bmap = "grass.bmp";
pos_x = 0;
pos_y = 0;
layer = 1;
flags = VISIBLE;
}

my first [problem is that the grass bitmap (64x64) is not appearing on the screen at all. (ive tried using the SHOW flag too).

function main()
{
first_pan =.visible = on;
etc etc...
}

how can i call the panel in functions like this? taking away the = sign doesnt solve the problem as it keeps telling me it is an unidentified identifier.

sorry about the length of this esspecially as there is probably a simple solution lol but yeah thanks in advance smile

Re: Panels - using Lite-C Free [Re: Onlydying] #273215
06/22/09 02:50
06/22/09 02:50
Joined: Jul 2005
Posts: 187
L
lostzac Offline
Member
lostzac  Offline
Member
L

Joined: Jul 2005
Posts: 187
You missed the * on PANEL should be PANEL* marking it as a pointer, that is also why you need the = sign as a reference to the object the pointer holds...


John C Leutz II

Re: Panels - using Lite-C Free [Re: lostzac] #273218
06/22/09 02:57
06/22/09 02:57
Joined: Jun 2009
Posts: 4
Sheffield (England)
Onlydying Offline OP
Guest
Onlydying  Offline OP
Guest

Joined: Jun 2009
Posts: 4
Sheffield (England)
Oh man thanks alot haha it shows the bmp on screen now smile funny how one tiny thing got me frustrated for 30+ minutes lol

how do i call it in a function to make it invisible again though?

first_pan.VISIBLE = off; doesnt work, ive probably missed something obvious again lol

Re: Panels - using Lite-C Free [Re: Onlydying] #273220
06/22/09 03:05
06/22/09 03:05
Joined: Jul 2005
Posts: 187
L
lostzac Offline
Member
lostzac  Offline
Member
L

Joined: Jul 2005
Posts: 187
set(PANEL_NAME,SHOW)
also read up on this for toggle, reset, and is in the manual

and do not get to frustrated we were all new once


John C Leutz II

Re: Panels - using Lite-C Free [Re: lostzac] #273222
06/22/09 03:11
06/22/09 03:11
Joined: Jun 2009
Posts: 4
Sheffield (England)
Onlydying Offline OP
Guest
Onlydying  Offline OP
Guest

Joined: Jun 2009
Posts: 4
Sheffield (England)
ah that makes sense cool ill look it up now

and thanks you've helped alot smile

Re: Panels - using Lite-C Free [Re: Onlydying] #273224
06/22/09 03:16
06/22/09 03:16
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline
Member
gamingfan101  Offline
Member
G

Joined: Jun 2009
Posts: 148
and also if you havnt go through the workshops, thats really helped me alot. Im also new to this and i also get frustrated a lot. And remember dont hesitate to ask questions.


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: Panels - using Lite-C Free [Re: Onlydying] #273225
06/22/09 03:17
06/22/09 03:17
Joined: Jul 2005
Posts: 187
L
lostzac Offline
Member
lostzac  Offline
Member
L

Joined: Jul 2005
Posts: 187
No a problem you'll find most the people here are friendly and have a lot of good advice and a lot you can learn from them


John C Leutz II

Re: Panels - using Lite-C Free [Re: gamingfan101] #273226
06/22/09 03:20
06/22/09 03:20
Joined: Jun 2009
Posts: 4
Sheffield (England)
Onlydying Offline OP
Guest
Onlydying  Offline OP
Guest

Joined: Jun 2009
Posts: 4
Sheffield (England)
I havent gone through the workshops yet but if its helped you alot then yeah ill work through them sounds like a good idea smile

@lostzac

and yeah its great being able to just ask and get help almost instantly tis a great community smile

Last edited by Onlydying; 06/22/09 03:22.

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