Not working inside of function
BlitzMax Forums/BlitzMax Beginners Area/Not working inside of function
| ||
I think this is stupid question and i just don't figure out solution now, so i put this on beginners are. So i am using this inside of function and i get "Expection access violation" If multiplayer=True And sync = 1 Then Local itemObj:TGNetObject = CreateGNetObject:TGNetObject( host ) SetGNetInt itemObj, 19, 1 SetGNetFloat itemObj, 2, x SetGNetFloat itemObj, 3, y SetGNetFloat itemObj, 4, z EndIf It works just fine outside of my function. Last edited 2012 |
| ||
Multiplayer or sync probably isn't defined as global. And you don't have debug mode on. |
| ||
Multiplayer is global and sync is variable of function |
| ||
and some why debugger is giving "Unhandled Expection: Assert failed" from this line:If GetGNetInt( remoteObj, 19) = 0 Then Any ideas? |
| ||
If GetGNetInt( remoteObj, 19) = 0 ThenremoteObj is the only thing which is not built into BlitzMax or GNet, so start your investigation there. What is remoteObj? |
| ||
i am using remoteObj and getting all kinds of gnetints, strings, floats from server, but only this variable somehow is giving me error. |
| ||
Split this line Local itemObj:TGNetObject = CreateGNetObject:TGNetObject( host ) into Local itemObj:TGNetObject = new TGNetObject itemObj = CreateGNetObject:TGNetObject( host ) (Im assuming host defiantly exists?) Anyway where is error message? |
| ||
Yes host exists. Looks like "Unhandled expection: assert failed" is only occuring if i create 2 GnetObjects, but it still showing me line: If GetGNetInt( remoteObj, 19) = 0 Then when i remove that line it shows another line where i am trying to get gnetint, string or float. Without debugger everything is working good and how i expected. Error comes with no reason. Is this bug of debugger or what? And i get expection access violation when i create gnetobject inside of function. No matter debugger on or off Last edited 2012 |