Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant archive_postsperpage - assumed 'archive_postsperpage' (this will throw an Error in a future version of PHP) in ..../archive/index.php on line 456
Coding troubles...(Delphi) [Archive] - Forums

PDA

View Full Version : Coding troubles...(Delphi)



TiX
06-10-2008, 09:24 AM
Well i have decided to redo my old TiX-BoT.. i am giving it a whole new look, re-coding the whole thing and now going to be using Packet.dll :)

Anyway i am having a little bit of trouble on doing some sort of code like this in a timer..:



if LightBox.Checked := True then
LightTimer.Enabled := True
end
else if LightBox.Checked := False then
LightTimer.Enabled := False
end;


Yes i know thats not 100% perfect coding... and it doesnt work could someone please help by fixing up this little bit of code?

AzzA.

Lowryder
06-10-2008, 10:02 AM
Have you tried something like...
if(checked)
start();
else if(!checked)
stop(); or am I misunderstanding something.

PhantoM
06-10-2008, 10:31 AM
Try this:



if LightBox.Checked := True then
LightTimer.Enabled := True
else
LightTimer.Enabled := False;


or this:



LightTimer.Enabled := LightBox.Checked;

ame
06-10-2008, 01:05 PM
if LightBox.Checked = True then

:= sets the value, just =, maybe ==.. Was a while ago! Compares them(In c# its = to set and == to compare)

TiX
06-10-2008, 03:39 PM
Okay got it thanks everyone!

Hmmm now all my current features work.. Now i must work on Outfits... Hmm I would like a ComboBox with the list of outfits.. and im sure i need to make each entry in the list to have a certain ID.. Could someone give me some tips on how to do the ID's in the list bit?