Run time error 5: "Invalid memory access"
#3

If anyone still might look into this thread, then I just encountered that error on me and I debugged like a hour or so. Cause I had lots of functions which depended on each other nested in each other and so. And I finally catched the reason why it gives that error.
I had one function where I wanted to return string from one of my functions which also returned string from function. So yeah, returning string from function can cause an issue like this. So yeah to fix this, before you return string, you have to get your string which you want to return, formatted in some string variable, and then you have to return the string variable. (It also might be my own incompetent by not knowing maybe it's written in PAWNs refenrece that you can't do that like this but yeah...)

So yeah maybe it helps someone in the future. Im going to copy and paste that case to other topics too related to that error. Maybe it helps some fellow scripters on the path.
Reply


Messages In This Thread
Run time error 5: "Invalid memory access" - by Wolfmaster - 09.09.2012, 19:27
Re: Run time error 5: "Invalid memory access" - by Wolfmaster - 11.09.2012, 16:08
Re: Run time error 5: "Invalid memory access" - by Caupo - 04.04.2014, 21:33

Forum Jump:


Users browsing this thread: 1 Guest(s)