Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, alibaba, TipmyPip), 1,144 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
pan_setevent problem #159185
10/06/07 19:54
10/06/07 19:54
Joined: Aug 2006
Posts: 78
A
amadeu Offline OP
Junior Member
amadeu  Offline OP
Junior Member
A

Joined: Aug 2006
Posts: 78
Hallo

I am creating in my game panels with buttons dinamically with pan_create function. I have one array of string with the name of the events an to set the events in each button I used pan_setevent function but the event did not work. My code is:

PANEL* panel2D[200];
STRING* NameEvent[200];
for (i= 0; i<200; i++)
{
pan_setevent(panel2D,3,1,NameEvent);
}

What is the wrong here? The "void* event" in pan_setevent function do not accept String type?

thx

Re: pan_setevent problem [Re: amadeu] #159186
10/07/07 08:42
10/07/07 08:42
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
A String is something that contains text like "This is a string" and an event is a function that lets something happen, so you should decide first what you want to do when someone hits that button, and then write a function for it, and then you can assign the function to the button like

pan_setevent(mypanel,3,1,myfunction);

Hope this helps.

Re: pan_setevent problem [Re: Spirit] #159187
10/07/07 08:49
10/07/07 08:49
Joined: Aug 2006
Posts: 78
A
amadeu Offline OP
Junior Member
amadeu  Offline OP
Junior Member
A

Joined: Aug 2006
Posts: 78
ok.

thanks

But I take the "myfunction" from one XML file dinamically and when I take this function, it is one String type and the pan_setevent do not accent (the game close)
I want to know if I could set myfunction in pan_setevent with String word.

thx


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