The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error in a script. Help!
Author Message
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #1
Error in a script. Help!
Hi! first, sry for my english ^_^
My script team friend are trying to do a new script of a item. A part of the script get's a error.

this is the part:

Code:
[ITEMDEF i_desmontar_despues]
id=i_hat_wizards
type=t_eq_script
on=@create
ATTR=attr_can_decay
try <TOPOBJ.UID> LINK.events -e_nopodesmontarpibe

And the error:

Code:
boleadoras.scp,49)Can't try 040001ce6 LINK.events -e_nopodesmontarpibe object pibeloco (040001ce6)

Anyone knows what is happend ?

thanks ^_^

[Image: 2hy9q0y.png]
(This post was last modified: 07-08-2012 06:33 AM by Lazarus.)
07-08-2012 06:33 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: Error in a script. Help!
try <TOPOBJ.UID> events -e_nopodesmontarpibe
or
try <TOPOBJ.UID> TOPOBJ.events -e_nopodesmontarpibe

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
07-08-2012 07:18 AM
Find all posts by this user Like Post Quote this message in a reply
Gil Amarth
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0



Post: #3
RE: Error in a script. Help!
Or better:

REF1 = <TOPOBJ.UID>
REF1.LINK.events -e_nopodesmontarpibe

Nevertheless, ON=@CREATE it´s a very bad trigger to put this code. It fires before to be positioned on the world, so there is no TOPOBJ to use.
(This post was last modified: 07-08-2012 07:32 AM by Gil Amarth.)
07-08-2012 07:21 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #4
RE: Error in a script. Help!
(07-08-2012 07:21 AM)Gil Amarth Wrote:  Or better:

REF1 = <TOPOBJ.UID>
REF1.LINK.events -e_nopodesmontarpibe

Nevertheless, ON=@CREATE it´s a very bad trigger to put this code. It fires before to be positioned on the world, so there is no TOPOBJ to use.
You're absolutely right =D

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
07-08-2012 12:14 PM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #5
RE: Error in a script. Help!
why not use @equip, see it is t_eq_script people can equip this right? Add and remove the event with @equip and @unequip. Or is this an item that is placed in the pack? If so use TIMERF 1, topobj.events -e_nopodesmontarpibe under @create

Code:
on=@create
attr=attr_can_decay
timerf 1, f_nopodesmontarpibe

[function f_nopodesmontarpibe]
if (<topobj.ischar>)
toptobj.events -e_nopodesmontarpibe
endif

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
07-09-2012 11:01 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
gonnie
Apprentice
*

Posts: 3
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jul 2012
Reputation: 0



Post: #6
RE: Error in a script. Help!
thank you guys i finally used the timerf which i didn't know about and it went great =o

i'm really new in this scripting thing. Is there any documentation besides the spherewiki that i can read to help me scripting? cos that timerf function doesn't appear in the wiki D:

i'm now trying to paralyze a target, how can i modify their flags :/

Code:
[function f_unpara]
FLAGS=<flags>&~statf_freeze

[EVENTS e_para_on_hit]
ON=@HIT
ARGO.FLAGS=<ARGO.FLAGS>|statf_freeze
ARGO.timerf 5, f_unpara
13:16:ERROR:(boleadoras.scp,51)Can't resolve <ARGO.FLAGS>
13:16:ERROR:(boleadoras.scp,51)Undefined keyword 'FLAGS'
13:16:ERROR:(boleadoras.scp,51)Undefined keyword 'ARGO.FLAGS'
13:16:ERROR:(boleadoras.scp,47)Can't resolve <flags>
13:16:ERROR:(boleadoras.scp,47)Undefined keyword 'FLAGS'
07-10-2012 02:29 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #7
RE: Error in a script. Help!
ARGO in @Hit is the weapon in the attackers hand is it not?
07-10-2012 04:49 AM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #8
RE: Error in a script. Help!
That's right Ran, you also need to use timerf to set the freeze flags in this scenario since @hit and @gethit are triggered before the hit is actually send through.
Code:
on=@hit
src.timerf 1, f_para //paralyze
src.timerf 6, f_unpara //unparalyze

[function f_para]
flags |= flags
update //update status bar

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
07-10-2012 08:01 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #9
RE: Error in a script. Help!
(07-10-2012 08:01 AM)Skul Wrote:  That's right Ran, you also need to use timerf to set the freeze flags in this scenario since @hit and @gethit are triggered before the hit is actually send through.
Code:
on=@hit
src.timerf 1, f_para //paralyze
src.timerf 6, f_unpara //unparalyze

[function f_para]
flags |= flags
update //update status bar

Can I put the freeze with the hit on the same time?
like don't wait 1 second to the paralyze and get the incoming damage anyways?.

Sry for my english.
I'm a buddy of Gonnie

Thanks ^_^

[Image: 2hy9q0y.png]
07-10-2012 10:03 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #10
RE: Error in a script. Help!
Try this:
Code:
ON=@HIT
SRC.FLAGS=<SRC.FLAGS>|STATF_FREEZE
SRC.TIMERF 5,FLAGS=<FLAGS>&~STATF_FREEZE
PS: I think SRC in @HIT is the attacked character, if NOT, just fix.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
(This post was last modified: 07-10-2012 10:15 AM by Extreme.)
07-10-2012 10:15 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)