Results 1 to 10 of 10

Thread: Exception every time I try to move stuff

  1. #1
    Peasant
    Join Date
    Jan 2007
    Posts
    8

    Default Exception every time I try to move stuff

    Hi there!

    Everytime I call something like AddAproach in my own games, I get a strange exception:



    btw the screen is German but I think you know what it says

    It happens when I call this:GetGoalManager():AddApproach(...); or similar stuff that tries to move entities. I tried with two versions of Novashell (currently the newest) and I also tried to use player scripts from the examples in my own games and I also followed the (new) tutorial step by step, but nothing helped.

    Since the examples work on my machine it seems I do some stuff wrong, but I'd really like to know what

    Hope someone can help, thanks!

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,376

    Default

    Hmm, I just tried playing with it and it seems ok here - I did put up new builds a few hours ago, did you try with that?

    If it's still broken please attach a .zip with your world that demonstrates it, I'm sure I can fix it then.

    It should never crash, even with bad input/no base brain initialized, so I really want to fix it.
    Seth A. Robinson
    Robinson Technologies

  3. #3
    Peasant
    Join Date
    Jan 2007
    Posts
    8

    Default

    Ahhh I'm sorry, it was my stupidity xD I installed the new version this morning, but to a different location, while not updating the shortcut and so I still used the old version... I'm so sorry

    well, with the new version the bug is fixed

    but I have a question: You use this:SetIsCreature(true); in the new tutorials, but neither it is documented nor it is implemented (I get console errors), maybe you should update the tutorial?

    thanks for your help anyways!






    EDIT

    ahhh new bug, this time with the new version! I fixed it myself but it's still a bug

    I accidently wrote elseif in one of my scripts, as a result, novashell crashed everytime it tried to parse the script, e.g. when clicking new or edit in the menu. it didn't even show any error, just quit without saying anything xD

    maybe you can fix it
    Last edited by cpury; 02-26-2007 at 02:56 PM.

  4. #4
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,376

    Default

    Entity:SetIsCreature is now documented here.

    It shouldn't be giving console errors!

    accidently wrote elseif in one of my scripts, as a result, novashell crashed everytime it tried to parse the script, e.g. when clicking new or edit in the menu. it didn't even show any error, just quit without saying anything xD
    Hmm, can you post the exact script that you used that caused the error?
    Seth A. Robinson
    Robinson Technologies

  5. #5
    Peasant
    Join Date
    Jan 2007
    Posts
    8

    Default

    1. this:setcreature thingy:
    here are the console errors I get when I use this:SetIsCreature(true); :

    Maybe I misunderstood the message?

    2. elseif crash:
    well, i just realized that the problem wasn't actually the elseif but that I forgot the "then" key word. just try "elseif (...) ... end" without then and it should crash. if not, I'll post my whole code.

    3. Another odd thing:
    Code:
    		if(ent:FunctionExists("Talk")) then
    			this:GetGoalManager():RemoveAllSubgoals();
    			this:GetGoalManager():AddApproach(ent:GetID(), C_DISTANCE_TALK);
    			this:GetGoalManager():AddSay("Hi there!", C_FACING_NONE);
    			this:GetGoalManager():AddRunScriptString("GetEntityByID(" .. ent:GetID() .. "):RunFunction('Talk');");
    	end
    The player approaches the target, then, instead of directly continueing with his goals, he waits for like 3 seconds and then continues (saying hi and run the talk function)...

    when I remove the approach goal, he instantly talks with the entity, without waiting, so it must be a problem with the approach goal?

    sorry for the work I cause you, but I think it's good bugfixing
    thanks!
    Last edited by cpury; 02-27-2007 at 04:25 PM.

  6. #6
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,376

    Default

    Hmm, this:SetIsCreature(true) definitely works on the latest version, how sure are you that you're running the latest? Try running the .exe directly, instead of double clicking a .novashell file in case the file association is wrong.

    I should really modify it show the build date at startup to make it a little clearer.

    I played with Approach using this code:

    Code:
    	this:GetGoalManager():AddApproach(GetEntityByName("Player"):GetID(), C_DISTANCE_TALK);
    	this:GetGoalManager():AddSay("All done", C_FACING_NONE);
    and there are no weird delays, if this still happens on the latest version perhaps you could attach or email me your "world" that shows the problem? Then I'm sure I could fix it.

    Thanks!!
    Seth A. Robinson
    Robinson Technologies

  7. #7
    Peasant
    Join Date
    Jan 2007
    Posts
    8

    Default

    ok, well, I downloaded my version on 26/2 but it was still the build from 25/2, maybe I was too early xD SetIsCreature is implemented since 26/2, so it's working now

    The approach lag is still there, so I attached my world files. The problem is in player.lua (LeftMouseClick()) and/or in Dragon.lua (Talk()). I hope you can fix it

    thanks for your help so far

    max
    Attached Files Attached Files

  8. #8
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,376

    Default

    Hmm, I don't see any approach lag?? If I click on the dragon the player walks up to the dragon (well, as long as he didn't move too far away..) and says his lines without a delay.

    Am I missing something here?

    Some other issues though:

    1. If you double click to choose a choice, that click is passed to the script, which things he clicked on the map to move which isn't good. I'll fix that.. for now should probably set it up to ignore mouse clicks until the conversion is over or something.

    2. After you click on the dragon, he should probably be told to stop moving so the player doesn't have to work so hard to catch him
    Seth A. Robinson
    Robinson Technologies

  9. #9
    Peasant
    Join Date
    Jan 2007
    Posts
    8

    Default

    Hmm, that's odd, then it's maybe on my machine only... But it's no ordinary lag, graphics and system work fine during the lag, it seems more like a hidden Delay LUA adds

    Well, I redid my whole project today and for now I removed the approach and let the player talk directly.

    btw everytime I'm making a general LUA syntax error (like forgetting then, end, etc.) Novashell completely crashes without any error message. Though the error is in the log file it should at least show some kind of error message, shouldn't it?

    Thanks for all your help, I'll try to stop annoying you for at least some time
    I'm looking forward to many good updates which make this awesome tool even better! Thanks for all your work!

  10. #10
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,376

    Default

    Thanks, please download the latest version, lua syntax errors no longer will crash the system. I had a bug where even after the syntax error it would try to run the script.. whups!
    Seth A. Robinson
    Robinson Technologies

Similar Threads

  1. Long time
    By in forum RTsoft Tavern
    Replies: 0
    Last Post: 11-21-2005, 06:10 AM
  2. How much time for licence
    By in forum RTsoft Tavern
    Replies: 1
    Last Post: 06-03-2004, 11:08 PM
  3. Can't move forward  :(
    By in forum Other RTsoft Games
    Replies: 3
    Last Post: 06-14-2003, 11:16 PM
  4. Server Time
    By in forum Funeral Quest
    Replies: 2
    Last Post: 04-02-2003, 12:07 AM
  5. Can't move into town
    By in forum Funeral Quest
    Replies: 1
    Last Post: 09-08-2002, 03:18 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •