Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (Grant, TipmyPip, AndrewAMD), 12,724 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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