Gamestudio Links
Zorro Links
Newest Posts
TMFs on options in live trading
by Spirit. 03/26/26 19:52
TDAmeritrade plugin with new Schwab accountt?
by AndrewAMD. 03/24/26 17:11
ZorroGPT
by TipmyPip. 03/20/26 07:00
Black Book, 4th edition
by jcl. 03/17/26 09:28
Trying to get started...
by Lukudo. 03/16/26 09:08
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 4,791 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
mredit, vestriaa, Lukudo, mldenoiser, the1
19204 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: 935
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 935
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