Author Topic: set #lobjectid  (Read 4737 times)

0 Members and 1 Guest are viewing this topic.

Offline talkmillTopic starter

  • Jr. Member
  • **
  • Posts: 36
  • Activity:
    0%
  • Reputation Power: 0
  • talkmill has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
set #lobjectid
« on: September 15, 2008, 09:50:51 AM »
0
Lol i seem to have stumbled upon yet another strange error (probably because i really don't have any clue about the inner workings of easyuo).

I have a sub which is suposed to open a bod, then click all the apropriate items in the backpack. Usually it works fine but sometimes it gets stuck and gets quite a weird behavior. In the code (to open the bod i have:

Code: [Select]
fillbod:
set #LOBJECTID !bod
event macro 17 0

This always seems to work the first time the bod is supposed to open. But if some errors are detected the code jumps to "fillbod:" again to restart. When that happens it doesn't manage to set the variable #LOBJECTID. I have checked by stepping thrue the code and saw that sometimes the line "set #LOBJECTID !bod" didn't set #LOBJECTID to the value in !bod (even though the value in !bod was set).

Has anyone got any idea what can make the set-command stop working sometimes?


Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: set #lobjectid
« Reply #1 on: September 15, 2008, 09:58:57 AM »
0
Are you sure you aren't accidentally changing the namespace?  You might have the correct namespace selected the first time, but this can change in another function/routine if you aren't careful.  Can you post or PM the full subroutine?
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Xclio

  • Officially "The MAN"
  • Elite
  • *
  • *
  • Posts: 981
  • Activity:
    0%
  • Reputation Power: 9
  • Xclio has no influence.
  • Gender: Male
  • Respect: +56
  • Referrals: 1
    • View Profile
Re: set #lobjectid
« Reply #2 on: September 15, 2008, 10:31:59 AM »
0
It does sound like at some point in time your changing the namespace that is the most logical reason as to why this would be happening.

Offline talkmillTopic starter

  • Jr. Member
  • **
  • Posts: 36
  • Activity:
    0%
  • Reputation Power: 0
  • talkmill has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: set #lobjectid
« Reply #3 on: September 15, 2008, 10:37:32 AM »
0
Yeah, i thought so, have to check again. Otherwise i will post the code. It's quite alot of ugly hard to follow code though :P

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: set #lobjectid
« Reply #4 on: September 15, 2008, 10:41:50 AM »
0
Yeah, i thought so, have to check again. Otherwise i will post the code. It's quite alot of ugly hard to follow code though :P

Put a "pause" at the beginning of that sub, and note the values of #NSNAME and #NSTYPE.  Then check it again when you get back to see if someone hijacked it.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline talkmillTopic starter

  • Jr. Member
  • **
  • Posts: 36
  • Activity:
    0%
  • Reputation Power: 0
  • talkmill has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: set #lobjectid
« Reply #5 on: September 15, 2008, 10:59:15 AM »
0
Thx for the quick help. Found two return in the middle of subs without namespace pop which probably caused it. Will try again to see if i get some hickups.

Now for an offtopic question: I am writing a script that uses another persons sub/script (craftinfo.txt by kal in ex). How do you go about to give proper thanks/acknowledgement when you have written a script that calls someone elses? Is it enough just to put the persons name in your header and a link, or should you ask the author for permission first?

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: set #lobjectid
« Reply #6 on: September 15, 2008, 11:59:52 AM »
0
I usually put a little something in after the header like:

Code: [Select]
;=======================================================
; Script Name: XIIxOveR's Lightning Lockpicking Trainer
; Author: XIIxOveR                                     
; Version: 1.0 Public                                   
; Shard OSI/FS: OSI                                     
; Revision Date: 14-May-2008                           
; Purpose: Train Lockpicking                           
;============================================================================
; Thanks to TM, Cerveza, and C2 for Gump, Wait, and Decimal Convert subs as
; well as great tutorials!
;============================================================================

XII
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: set #lobjectid
« Reply #7 on: September 15, 2008, 01:44:58 PM »
0
Thx for the quick help. Found two return in the middle of subs without namespace pop which probably caused it. Will try again to see if i get some hickups.

Now for an offtopic question: I am writing a script that uses another persons sub/script (craftinfo.txt by kal in ex). How do you go about to give proper thanks/acknowledgement when you have written a script that calls someone elses? Is it enough just to put the persons name in your header and a link, or should you ask the author for permission first?

I've found several "mainstream" scripts that jump out of a sub without first setting the namespace back.  Hell, I've accidentally done it myself.  They are just hard bugs to track down.

Typically Kal allows his script snippets posted without issue, but do be sure to put credit in your script and you'll be fine. 

Problem comes when you are posting a complete, but tweaked script from someone else.  For that you always need to seek their approval.

Edit:  Don't type and drink at the same time; it leads to massive typos!  heh.
« Last Edit: September 16, 2008, 01:46:24 AM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline talkmillTopic starter

  • Jr. Member
  • **
  • Posts: 36
  • Activity:
    0%
  • Reputation Power: 0
  • talkmill has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: set #lobjectid
« Reply #8 on: September 15, 2008, 09:37:41 PM »
0
True, the problem is I haven't found a way where kal in ex has posted this one, i've only seen it with other peoples scripts. Guess i will have to contact him and ask :)

Tags: