Announcement

Collapse
No announcement yet.

GUI Controller Accessed Nones

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    The ClearControls function in the GUIController is not directly called from my new code. It's an automatic call from some other class. And it's not my tabs causing the problem because I put the originals tabs back and I'm still getting the error. It might be my new page class that's causing it.

    Leave a comment:


  • replied
    From my experience, the accessed none errors have never induced a human-detectable error (e.g. a game crash, a weird-side effect which is easily noticeable). The code, as far as you can tell, does what you want, but it will still insist on spamming this error. Its one of lifes little annoyances, ah the joys of debugging.

    Anyway, I would make sure you are referencing an object that exists, I stamp out most of those sort of errors I come accross just by doing that. Im sure there are other explanations that I don't know about though.

    BTW, just out of interest, there is a way to reference a variable of objects that do not exist. You can access the class as a general, but you will not get a real-time value (e.g. the latest value of something that changes, like a pawns location). You can, however, pull up default variable values, like player groundspeeds, like:
    myvariable = class'MyClasses.MyActor'.Default.MyVariable;

    Leave a comment:


  • replied
    I'm having the same problem. I believe the problem is being cause by my new tabs that I used instead of others. If I replace them with the originals, no errors occur in the logs. And I have no errors in the tab classes themselves so I'm stumped!

    Leave a comment:


  • replied
    Nice explanation, thanks

    Leave a comment:


  • replied
    I cannot offer advice on the specific accessed none error, because I don't know your code, but this is what usually makes it occur:

    This is a very common error that people make when developing in object orientated languages.

    The accessed none error occurs when the software cannot locate a variable which you are trying to reference. This is usually because you are trying to access an object that does not exist in the game. I.E The object MUST have been spawned to be referenced!

    So, for example, if you want a variable 'speed' out of an actor, and you put:

    local actor myactor;

    myspeed = myactor.speed;

    That will cause an accessed none, because you have not told the game what the myactor actually is, you must say something like:

    local actor myactor;

    myactor = spawn(class'mythingtospawn');
    myspeed = myactor.speed;

    Provided the game successfully spawned the object, and the variable 'speed' exists inthe object, that would now NOT cause an error.

    There are many forms of this, but they usually come down to one thing: Make sure you are trying to get a variable from an object that exists in the game (e.g. has been spawned). I would suggest that you are destroying an object being referenced from the GUI code, or that you have changed a property that it relies on, but thats just a guess.

    Leave a comment:


  • started a topic GUI Controller Accessed Nones

    GUI Controller Accessed Nones

    I made a new weapon for UT2003, but checking out the log, I'm getting a lot of accessed nones in the ClearControls fuction of GUIController. Since I didn't add any GUI code, I find this quite odd. Any suggestions where the problem might be coming from?
Working...
X