Smurfpuss,
I had a quick glance through your code - don't quote me on this, however it looks like Function SaveNoe( Filename$ )
at least refers to a bunch of variables it couldn't see, define all the variables you access in functions as global in the main app if you're not passing them explicitly through the function call (like filename$ above).
ie. in Function SaveNoe( Filename$ )
WriteInt File, SendMessage( xpos , "SM_GETVALUE" );Terrain x pos
WriteInt File, SendMessage( ypos , "SM_GETVALUE" );Terrain y pos
WriteInt File, SendMessage( zpos , "SM_GETVALUE" );Terrain z pos
xpos,ypos and zpos aren't global vars so it will save probably 0's for all of these values. Check all your functions for this type of error.
ie. change:
xpos# = Spinner( 153, 116, 60, 15, 0.0, 1.0, 1000.0, 1.0, 0, 0 )
ypos# = Spinner( 153, 96, 60, 15, 0.0, 1.0, 1000.0, 1.0, 0, 0 )
zpos# = Spinner( 153, 74, 60, 15,0.0, 1.0, 1000.0, 1.0, 0, 0 )
to
global xpos# = Spinner( 153, 116, 60, 15, 0.0, 1.0, 1000.0, 1.0, 0, 0 )
global ypos# = Spinner( 153, 96, 60, 15, 0.0, 1.0, 1000.0, 1.0, 0, 0 )
global zpos# = Spinner( 153, 74, 60, 15,0.0, 1.0, 1000.0, 1.0, 0, 0 )
as you've done with some of the other vars in your app.
I hope this helps,
-R
I had a quick glance through your code - don't quote me on this, however it looks like Function SaveNoe( Filename$ )
at least refers to a bunch of variables it couldn't see, define all the variables you access in functions as global in the main app if you're not passing them explicitly through the function call (like filename$ above).
ie. in Function SaveNoe( Filename$ )
WriteInt File, SendMessage( xpos , "SM_GETVALUE" );Terrain x pos
WriteInt File, SendMessage( ypos , "SM_GETVALUE" );Terrain y pos
WriteInt File, SendMessage( zpos , "SM_GETVALUE" );Terrain z pos
xpos,ypos and zpos aren't global vars so it will save probably 0's for all of these values. Check all your functions for this type of error.
ie. change:
xpos# = Spinner( 153, 116, 60, 15, 0.0, 1.0, 1000.0, 1.0, 0, 0 )
ypos# = Spinner( 153, 96, 60, 15, 0.0, 1.0, 1000.0, 1.0, 0, 0 )
zpos# = Spinner( 153, 74, 60, 15,0.0, 1.0, 1000.0, 1.0, 0, 0 )
to
global xpos# = Spinner( 153, 116, 60, 15, 0.0, 1.0, 1000.0, 1.0, 0, 0 )
global ypos# = Spinner( 153, 96, 60, 15, 0.0, 1.0, 1000.0, 1.0, 0, 0 )
global zpos# = Spinner( 153, 74, 60, 15,0.0, 1.0, 1000.0, 1.0, 0, 0 )
as you've done with some of the other vars in your app.
I hope this helps,
-R