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
Taming error
Author Message
Kapa
Journeyman
*

Posts: 74
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2014
Reputation: 0



Post: #1
Taming error
21:13:ERROR:(sphere_skills.scp,780)Undefined symbol 'id'

By the way the animal still attack tamer so i think this doesnt work anyway.


[SKILL 35]
DEFNAME=Skill_Taming
KEY=Taming
TITLE=Animal Tamer
PROMPT_MSG=Tame which animal?
DELAY=2.0
STAT_STR=30
STAT_INT=40
STAT_DEX=60
BONUS_STR=30
BONUS_DEX=10
BONUS_INT=60
BONUS_STATS=20
ADV_RATE=0.1,0.1,0.1

ON=@Fail
SRC.SYSMESSAGE You fail to tame the creature.

ON=@Abort
SRC.SYSMESSAGE You give up trying to tame the creature.

ON=@Success
if (<act.attacker.id <uid>>>=0) // line 780
act.attacker.delete <uid>
endif
11-16-2014 06:15 PM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #2
RE: Taming error
Previously Attacker.x was returning error if the character has no attackers, it's been fixed some builds ago... so I guess you have an outdated one? Anyway, to prevent this you can use a safecheck there:

Code:
ON=@Success
if (<act.attacker>)
if (<act.attacker.id <uid>> >= 0)
  act.attacker.delete <uid>
endif
endif
11-16-2014 07:19 PM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #3
RE: Taming error
or try using (<act.attacker.id <uid>> != -1)
because attacker.xxx functions will return -1 instead 0 when there's no attacker
(This post was last modified: 11-17-2014 01:38 AM by Coruja.)
11-17-2014 01:38 AM
Find all posts by this user Like Post Quote this message in a reply
Runcuks
Journeyman
*

Posts: 179
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Nov 2012
Reputation: 0



Post: #4
RE: Taming error
try

act.memoryfindtype.memory_fight.remove
act.memoryfindtype.memory_aggreived.remove
11-17-2014 07:10 PM
Find all posts by this user Like Post Quote this message in a reply
Kapa
Journeyman
*

Posts: 74
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2014
Reputation: 0



Post: #5
RE: Taming error
21:56:ERROR:(shrink_fix.scp,7)Undefined keyword 'act.memoryfindtype.memory_fight.remove'
21:56:ERROR:(shrink_fix.scp,8)Undefined keyword 'act.memoryfindtype.memory_aggreived.remove'

How to stop an animal from atacking you after unshrink?

[typedef t_figurine]
ON=@DClick
//ref1=<more2>
//if (<ref2.ischar> && <ref2.IsMyPet> && (<ref2.flags>&statf_war))
//ref2.flags &=~statf_war
//endif
if (<act.attacker.id <uid>> != -1) // line 780
act.attacker.delete <uid>
endif

22:02:ERROR:(shrink_fix.scp,7)Can't resolve <act.attacker.id 040018e8d>
22:02:ERROR:(shrink_fix.scp,8)Undefined keyword 'act.attacker.delete'

is there a flag for peacemaking? and is it possible to add this flag to the animal after unshrinking it?
(This post was last modified: 11-24-2014 08:06 AM by Kapa.)
11-24-2014 07:58 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #6
RE: Taming error
Code:
if (<act.attacker.id <uid>> != -1) // line 780
act.attacker.delete <uid>
endif
This code was meant to be used in the @Success trigger of Taming skill, it won't work anywhere you want it to work. You must uncomment 'ref1=<more2>' and change '<uid>' for '<ref1>' because <uid> (in @DClick trigger) refers to the item.
11-25-2014 04:44 AM
Find all posts by this user Like Post Quote this message in a reply
Kapa
Journeyman
*

Posts: 74
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2014
Reputation: 0



Post: #7
RE: Taming error
I did try that @Success trigger of Taming skill but it didnt work. Please help me to sort this script out i just want an animal to stop attacking a player after unshrink

[typedef t_figurine]
ON=@DClick
ref1=<more2>
//if (<ref2.ischar> && <ref2.IsMyPet> && (<ref2.flags>&statf_war))
//ref2.flags &=~statf_war
//endif
if (<act.attacker.id <ref1>> != -1) // line 780
act.attacker.delete <ref1>
endif

[EOF]


19:37:ERROR:(shrink_fix.scp,7)Can't resolve <act.attacker.id 0175db>
19:37:ERROR:(shrink_fix.scp,8)Undefined keyword 'act.attacker.delete'
11-25-2014 05:41 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #8
RE: Taming error
My fault, didn't change everything:

Code:
ON=@DClick
ref1=<more2>
if !(<ref1>)
return 0
endif
if (<ref1.attacker>)
if (<ref1.owner>==<src>)
  if (<ref1.attacker.id <src>> != -1)
   ref1.attacker.delete <src>
  endif
endif
endif

This should work, it first checks if the ref1 (the pet) has attackers, if so it checks if who DClicks the figurine is the owner of the pet (you can remove this line to make it to apply that to any player unshrinking the pet) and then it performs the check about attacker.id.
11-25-2014 11:29 PM
Find all posts by this user Like Post Quote this message in a reply
Kapa
Journeyman
*

Posts: 74
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2014
Reputation: 0



Post: #9
RE: Taming error
dont you anyway become the owner of the pet when you do unshrink?

it doesnt work :/ pet still remembers the attacker

13:24:ERROR:(shrink_fix.scp,9)Undefined symbol 'id'
13:24:ERROR:(shrink_fix.scp,10)Undefined keyword 'ref1.attacker.delete'
(This post was last modified: 11-26-2014 11:26 PM by Kapa.)
11-26-2014 11:20 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #10
RE: Taming error
This works fine for me

Code:
//Put this in the Animal Taming Skill
ON=@Success
ref1 = <act>
local.index = <ref1.attacker.id <src>>
ref1.attacker.<dlocal.index>.delete
11-27-2014 12:46 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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