What is wrong here?

Blitz3D Forums/Blitz3D Programming/What is wrong here?

EpicElrod(Posted 2015) [#1]
Every time I compile my code it says "Memory Access Violation"




steve_ancell(Posted 2015) [#2]
Have you tried running in debug mode?, that may give you more of a lead to follow.


steve_ancell(Posted 2015) [#3]
Also try making your user variable global.


Zethrax(Posted 2015) [#4]
Make sure you have debug mode turned on ('Main menu > Program > Debug enabled') to get useful debugging info. Also try inserting the 'Stop' command at various point in the code to try to drill down to where the problem is occurring. Try adding some debugging code to return the values stored in the variables used to hold entity handles. Chances are the problem is caused by supplying a zero value as an entity handle because the variable hasn't yet been assigned the value of the handle.


Looks like some of my old code from the code archives. Good to see it getting put to use. Although seeing 'the_yaw#' and 'the_pitch#' in there reminds me of how dodgy some of my early coding conventions were.

I updated that FPS code archive code a while back too, so it might be worth your checking out the new code: http://www.blitzbasic.com/codearcs/codearcs.php?code=1137


_PJ_(Posted 2015) [#5]
Have you actually gotten the user32.decls with correct "lib" and lines in your userlibs directory?