I'll post some more here in a minute, but the first thing I noticed is that when you are declaring a float, you are declaring it like:
X as float You will need to put a pound(#) symbol after the variable name in order for it to be a float.
X# as float Won't make too much of a difference, but still something you should be aware of.

more to come.
TheComet got you on track, but I'm going to go in a little more detail on your original code:
First thing to realize when doing collision is that you will need to store the original X, Y, & Z of the object before it moves. I generally set these variables up as global, or inside of a type.You are doing this, but not in a way that is going to have an effect. The steps would be like this:
1. Store oldX#, oldy#, oldz#
2. Move object
3. SC_UpdateCollision
4. If collision occurs move object back to oldX#, oldy#, oldz#
I'll post an update to your code in just a moment....
EDIT: Had to eat some lunch!
Alright. I changed your code quite a bit, but I commented it with some info. It's probably not the most elegant way of doing it, but it works, and hopefully it'll make sense enough for you to work with and expand upon.
`Arrows ad WASD to move
`Space to jump
`Control to rotate
type shape
num as integer
X# as float
Y# as float
Z# as float
Yr as integer
endtype
type PlayerType
num as integer
X# as float
Y# as float
Z# as float
oldX# as float
oldY# as float
oldZ# as float
Yr as integer
endtype
`Set up sync and camera
sync on : sync rate 60
autocam off
`declare variables
main as PlayerType
dim platform(3) as shape
global MoveRate#
global StrafeRate#
global TurnRate#
global jumpRate#
`Set up objects
`Set up character
make object cube 1, 25
main.num = 1
main.X# = 0.0
main.Y# = 0.0
main.Z# = 0.0
color object 1, rgb(0, 255, 0)
sc_setupObject 1, 0, 0
global ground as boolean = 1
global jump as integer = 0
turn object right main.num, -90
`Set up a platform
make object cube 2, 50
platform(0).num = 2
platform(0).X# = -250.0
platform(0).Y# = 12.5
platform(0).Z# = 500.0
position object 2, platform(0).X#, platform(0).Y#, platform(0).Z#
sc_setupObject 2,1,2
`Another platform
make object cube 3, 75
platform(1).num = 3.0
platform(1).X# = -187.5
platform(1).Y# = 25.0
platform(1).Z# = 500.0
position object 3, platform(1).X#, platform(1).Y#, platform(1).Z#
sc_setupObject 3,1,2
`Third platform
make object cube 4, 100
platform(2).num = 4
platform(2).X# = -100.0
platform(2).Y# = 37.5
platform(2).Z# = 500.0
position object 4, platform(2).X#, platform(2).Y#, platform(2).Z#
sc_setupObject 4,1,2
`Sphere platform
make object sphere 5, 50
platform(3).num = 5
platform(3).X# = 100.0
platform(3).Y# = 12.5
platform(3).Z# = 500.0
position object 5, platform(3).X#, platform(3).Y#, platform(3).Z#
sc_setupObject 5,1,1
`#####################################
`############# Main Loop #############
`#####################################
do
UpdateVariables()
UserInput()
MovementAndCollision()
position camera main.X#, main.Y#+50, main.Z#-150
point camera main.X#, main.Y#, main.Z#
`If you turn SYNC ON, you're going to need to call a 'SYNC' at the end of your loop
sync
sync
loop
end
`#########################################
`#########################################
function UpdateVariables()
`reset variables so that movement does not happen when keys are not pressed.
`This will help if you are wanting to implement acceleration in your movement
`such as the acceleration and deceleration of the jumpin.
MoveRate# = 0
StrafeRate# = 0
TurnRate# = 0
`update the jumping code.
`|| is just an operand for "or"
`Take out "|| main.Y#" if you have a platform to stand on.
`It's just there since there is no ground for now.
dec jumpRate# ,0.2
if ground = 1 || main.Y# =< 0.0
ground = 1
jumpRate# = 0.0
endif
endfunction
function UserInput()
`input *Added WASD movement.*
`Also added all input commands into one function.
if upkey() || keystate(30) then MoveRate# = 2
if downkey() || keystate(32) then MoveRate# = -2
if leftkey() || keystate(17) then StrafeRate# = -2
if rightkey() || keystate(31) then StrafeRate# = 2
if controlkey() then TurnRate# = 1
if spacekey() and ground
jumpRate# = 8.0
ground = 0
endif
endfunction
function MovementAndCollision()
`let's store the old data.
main.oldX# = main.X#
main.oldY# = main.Y#
main.oldz# = main.Z#
`Check for Gravity
`I always move the object down a little bit, check for collision
`then move it back up. If there was no collision, then set ground = 0
`sc_updateObject always before each collision check, whether it is vertical, or horizontal.
move object down main.num, 1
sc_updateObject main.num
if SC_ObjectCollision( 1 , 0 ) = 0 then ground = 0
move object up main.num, 1
sc_updateObject main.num
`Update jumping movement
`For simple object movement and collision, I always do the jumping
`seperate from the horizontal movement. For more advanced movement,
`look into sliding collision. If not jumping up, or falling down,
`don't check for collision. IT shouldn't be necessary.
if JumpRate# <> 0.0
move object up main.num, JumpRate#
sc_updateObject main.num
if SC_ObjectCollision( 1 , 0 )
ground = 1
main.Y# = main.oldY#
position object main.num, main.X#, main.OldY#, main.Z#
sc_updateObject main.num
set cursor 0,0: print "COLLISION!"
endif
main.Y# = object position y(main.num)
endif
`Update horizontal movement
`Same thing here. If there is no movement, don't check for collision.
if MoveRate# <> 0.0 or StrafeRate# <> 0.0
move object main.num, MoveRate#
move object left main.num, StrafeRate#
sc_updateObject main.num
if SC_ObjectCollision( 1 , 0 )
main.X# = main.oldX#
main.Z# = main.oldz#
position object main.num, main.oldX#, object position y(main.num), main.oldZ#
sc_updateObject main.num
endif
main.X# = object position x(main.num)
main.z# = object position z(main.num)
endif
endfunction
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.