Alice Community  

Go Back   Alice Community > Alice 2 > Suggestion Box

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
definning paramerters and variables suggestion
Old
roofy
Guest
 
Status:
Posts: n/a
Default definning paramerters and variables suggestion - 10-14-2006, 11:56 AM

I know that Alice is now in the hands of EA sports, but could who ever knows how to contact EA sports, mention to them that parameters and variables include the difference between float, integer values? I already had two incidents so far when Alice returned a parameter false becuase the parameter was an integer and the check condition was a float.

for example.
I got an event that says this

When anykey is typed,
do sphere.speak whichKey=code

the method sphere.speak looks like this
parameters whichKeyCode

if whichKeyCode == 38 then
sphere say the upArrow key was pressed
else
nothing

now when I originally did this, the parameter whichKey was 38. However the if statement was checking it like this...

if 38 == 38.0

these are totally two different types of varibles. The "38" is a integer, and the "38.0" is a float. In addition, even if you put the round function in front of the value 38.0 it still reads as 38.0 which causes the if statement to always be false, and this is annoying.
   
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.