danfloun
02-13-2005, 11:55 AM
I am simply trying to display a message with the users operating system name in it. Using 'if' on it's own works fine but when I add 'else' it doesn't.
Can anyone show me a better way or explain why 'else' isn't working.
This works:
osresult = System.GetOSName();
if osresult == "Windows XP" then
Dialog.Message("Your OS is..", osresult);
end
This doesn't:
osresult = System.GetOSName();
if osresult == "Windows XP" then
Dialog.Message("Your OS is..", osresult);
else
if osresult == "Windows 2000" then
Dialog.Message("Your OS is..", osresult);
end
I know its easier to just use:
osresult = System.GetOSName();
Dialog.Message("Your OS is..", osresult);
end
but I am just testing a few things and my final code will not display the operating system but I just need to know why my 'else' steatement isnt working.
Thanks
Can anyone show me a better way or explain why 'else' isn't working.
This works:
osresult = System.GetOSName();
if osresult == "Windows XP" then
Dialog.Message("Your OS is..", osresult);
end
This doesn't:
osresult = System.GetOSName();
if osresult == "Windows XP" then
Dialog.Message("Your OS is..", osresult);
else
if osresult == "Windows 2000" then
Dialog.Message("Your OS is..", osresult);
end
I know its easier to just use:
osresult = System.GetOSName();
Dialog.Message("Your OS is..", osresult);
end
but I am just testing a few things and my final code will not display the operating system but I just need to know why my 'else' steatement isnt working.
Thanks