Author Topic: global variable check  (Read 4462 times)

0 Members and 1 Guest are viewing this topic.

Offline Doan Sephim

global variable check
« on: December 02, 2003, 12:12:21 AM »
hi all!
x = 10
when x = 15, 30, 45, 75 ego gains new abilities. now i can do this, but everytime x increases i have to write in code for how to handle whatever number x becomes...so i write the same code for everytime i increase x...i suspect there is a way to write the code once, and jump to it without having to write it out several times. if so, where do i put it?
thanks
doan


Artificial Intelligence Competition

Offline Doan Sephim

Re:global variable check
« Reply #1 on: December 02, 2003, 12:19:47 AM »
oh!! Im stupid!
as soon as i read my post to make sure it made sense, it hit me like lightning!
i set a procedure (xcheck) and put all the code there, and then i jsut type in (xcheck) anywhere i want it done...i guess sometimes it just helps to see the problem in writing!
doan


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.044 seconds with 22 queries.