Scripting Problems [message #274226] |
Thu, 19 July 2007 10:16 |
|
Jerad2142
Messages: 3813 Registered: July 2006 Location: USA
Karma: 6
|
General (3 Stars) |
|
|
Okay, I have been trying to use the script function "Get_Sex" (which sends an A for male and a B for female) to try to make the script detect when it is a male or female, currently I can't get it to do anything, when ever I try making it something like:
char sex = Get_Sex(obj);
if (sex == "A")
And many other attempts with comma's and other stuff I get back an error that const char can not equal a char. Is there a way I could convert the letter A to a char? Or a better way to do the?
Visit Jerad's deer sweat shop
|
|
|
|
Re: Scripting Problems [message #274236 is a reply to message #274232] |
Thu, 19 July 2007 11:12 |
|
Jerad2142
Messages: 3813 Registered: July 2006 Location: USA
Karma: 6
|
General (3 Stars) |
|
|
danpaul88 wrote on Thu, 19 July 2007 11:45 | shouldn't it be == 'a' if it returns a char? "" is for strings, '' for char
|
Yep! Looks like all that I needed to do was put 'a', I learn something new every day, thank Danpaul88. Now my 12kb script is working so I am happy
Visit Jerad's deer sweat shop
|
|
|