Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Globa Variable Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
johnsde
Newbie
Newbie
Avatar

Joined: April 01 2004
Location: United States
Online Status: Offline
Posts: 17
Posted: April 21 2004 at 12:43 | IP Logged Quote johnsde

Can any one tell me why this doesn't ad to my global variable "butt"

ph_setccbtnbcolor( 1, 1, 230 )+ph_delay( 500 )+ph_setccbtnbcolor(1,1,12632256)+ph_delay(500)+ph_setccbtnbcolor(1,ph_getglobal_n ( "butt" ),230)+ph_addtovar ( 3,("butt"), 1)

Everything works tell I get to  the addvar. Want to be able to scan through a set of buttons.

 

Thanks

Back to Top View johnsde's Profile Search for other posts by johnsde
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: April 21 2004 at 13:51 | IP Logged Quote TonyNo

I believe you need to change "butt" to "{BUTT}".

So...

ph_getglobal_n( "butt" )

would be...

ph_getglobal_n( "{BUTT}" )

etc.

Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
johnsde
Newbie
Newbie
Avatar

Joined: April 01 2004
Location: United States
Online Status: Offline
Posts: 17
Posted: April 21 2004 at 18:00 | IP Logged Quote johnsde

Thnaks for the fast reply.

Heres what I have now:

ph_setccbtnbcolor( 1, 1, 230 )+ph_delay( 500 )+ph_setccbtnbcolor(1,1,12632256)+ph_delay(500)+ph_setccbtnbcolor(1,ph_getglobal_n ( "BUTT" ),230) +ph_addtovar ( 3,"{BUTT}", 1)

When I add the  +ph_addtovar ( 3,"{BUTT}", 1) I expected to have my Global variable increase by 1 but it stays the same. I wanted to use the Global variable to keep track of what button I'm on when scanning a group of buttons.

Back to Top View johnsde's Profile Search for other posts by johnsde
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: April 21 2004 at 21:28 | IP Logged Quote TonyNo

ph_addtovar is only for System variables.

I was wrong about the braces! Use this to increment...

ph_setglobal_a( "BUTT", ph_getglobal_n( "BUTT" ) + 1)

 

Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
johnsde
Newbie
Newbie
Avatar

Joined: April 01 2004
Location: United States
Online Status: Offline
Posts: 17
Posted: April 23 2004 at 19:15 | IP Logged Quote johnsde

Thanks that worked great

 

johnsde

 

Back to Top View johnsde's Profile Search for other posts by johnsde
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum