RE: Return misplacing values?
- Posted by Steve <bleak_outlook at hotmail.com> Nov 15, 2005
- 428 views
Hi! Thanks for the response and sorry it took so long for me to respond. Here are my actual routines and the ex.err. I know that stateC doesn't grow out of the limits of an integer as GameState (which it is derived from) is only given constants that are 50000 as an upper limit. ************************************ EX.ERR ************************************ D:\Digital Crypt\EUPHORIA\Projects\SDL\GalaxyOne\galaxy_misc.ew:26 in function make_state_code() A machine-level exception occurred during execution of this statement stateC = <no value> imp = <no value> Global & Local Variables D:\Digital Crypt\EUPHORIA\Projects\SDL\GalaxyOne\galaxy.exw: GameState = {30000,7000,0} sounds_dir = {68'D',58':',92'\',68'D',105'i',103'g',105'i',116't',97'a', 108'l',32' ',67'C',114'r',121'y',112'p',116't',92'\',69'E',85'U',80'P',72'H', 79'O',82'R',73'I',65'A',92'\',80'P',114'r',111'o',106'j',101'e',99'c',116't', 115's',92'\',83'S',68'D',76'L',92'\',71'G',97'a',108'l',97'a',120'x',121'y', 79'O',110'n',101'e',92'\',115's',111'o',117'u',110'n',100'd',115's'} graphics_dir = {68'D',58':',92'\',68'D',105'i',103'g',105'i',116't',97'a', 108'l',32' ',67'C',114'r',121'y',112'p',116't',92'\',69'E',85'U',80'P',72'H', 79'O',82'R',73'I',65'A',92'\',80'P',114'r',111'o',106'j',101'e',99'c',116't', 115's',92'\',83'S',68'D',76'L',92'\',71'G',97'a',108'l',97'a',120'x',121'y', 79'O',110'n',101'e',92'\',103'g',114'r',97'a',112'p',104'h',105'i',99'c', 115's'} fonts_dir = {68'D',58':',92'\',68'D',105'i',103'g',105'i',116't',97'a', 108'l',32' ',67'C',114'r',121'y',112'p',116't',92'\',69'E',85'U',80'P',72'H', 79'O',82'R',73'I',65'A',92'\',80'P',114'r',111'o',106'j',101'e',99'c',116't', 115's',92'\',83'S',68'D',76'L',92'\',71'G',97'a',108'l',97'a',120'x',121'y', 79'O',110'n',101'e',92'\',102'f',111'o',110'n',116't',115's'} main_dir = {68'D',58':',92'\',68'D',105'i',103'g',105'i',116't',97'a', 108'l',32' ',67'C',114'r',121'y',112'p',116't',92'\',69'E',85'U',80'P',72'H', 79'O',82'R',73'I',65'A',92'\',80'P',114'r',111'o',106'j',101'e',99'c',116't', 115's',92'\',83'S',68'D',76'L',92'\',71'G',97'a',108'l',97'a',120'x',121'y', 79'O',110'n',101'e'} D:\Euphoria\include\misc.e: pretty_end_col = <no value> pretty_chars = <no value> pretty_start_col = <no value> pretty_level = <no value> pretty_file = <no value> pretty_ascii = <no value> pretty_indent = <no value> pretty_ascii_min = <no value> pretty_ascii_max = <no value> pretty_line_count = <no value> pretty_line_max = <no value> pretty_dots = <no value> pretty_fp_format = <no value> pretty_int_format = <no value> pretty_line = <no value> D:\Euphoria\include\file.e: SLASH = 92'\' my_dir = -2 D:\Euphoria\include\machine.e: mem = 1120040 check_calls = 1 D:\Digital Crypt\EUPHORIA\Projects\SDL\GalaxyOne\Sdl_Wrap.ew: sdl = 268435456 D:\Euphoria\include\get.e: input_file = <no value> input_string = <no value> string_next = <no value> ch = <no value> D:\Digital Crypt\EUPHORIA\Projects\SDL\GalaxyOne\galaxy.exw: convform = <no value> micex = 770384 micey = 905440 keystate = <no value> galms = <no value> ret = 1 statecode = 37000 fnumb = 3 timer_callback1 = 713864 gal_timer = 3828112 Gkeymap = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,380232} galaxy = { {0,0,{},{},0}, {0,0,{},{},0}, {0,0,{},{},0}, {0,0,{},{},0}, {0,0,{},{},0} } solsys = {0,0,{},{},0} planet = { 0, 0, 0, 0, 0, {0,0,0,0}, 0, {} } GameSignalQueue = {0,101'e'} GameSpeed = 3 fullsec = <no value> onetick = <no value> screen_ptr = 3822984 galaxy_buffer = 3827904 Warning: private variable fopened in get_datafile_bmp() in load_data_bmp.ew is not used Warning: private variable cow in build_galaxy() in galaxy.exw is not used Warning: private variable dog in build_galaxy() in galaxy.exw is not used Warning: local variable convform in galaxy.exw is not used Warning: local variable keystate in galaxy.exw is not used Warning: local variable galms in galaxy.exw is not used Warning: local variable fullsec in galaxy.exw is not used Warning: local variable onetick in galaxy.exw is not used ************************************ make_state_code.ew ************************************ global function make_state_code() -- Makes a state code from GameState integer stateC stateC = 0 for imp = 1 to length(GameState) do stateC += GameState[imp] end for return stateC end function ------------------ Note: GameState is a 3 item sequence ------------------ as seen in the ex.err file. ************************************ My timer function, just a simple SDL timer that ticks every 20ms. ************************************ global function tempo(atom galaxy_interval, atom galaxy_parameter) -- 40 ticks/sec if statecode < GAME_PAUSED then -- yeah this doesn't do anything :) end if return galaxy_interval end function This program isn't really that large but it is broken down into several smaller code files. It is big enough that it won't fit in a topica message though.... at least I think.... Thanks for taking a look, I really appreciate it. Sinc, Steve A.