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
FUNCTION f_onchar_create not working?
Author Message
Coruja
Sphere Developer
*****

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

Dimension Shard

Post: #4
RE: FUNCTION f_onchar_create not working?
f_onchar_create is working fine here
I tested using SRC.NAME=Testing and the char got created with NAME=Testing without any problems

but set stats/skills doesn't make effect on f_onchar_create because sphere will set default stats/skills for selected profession/skills after f_onchar_create, so if you set custom values on f_onchar_create they will be replaced with default values later. So the most recommended solution is replace all these 60 lines with this simple code

Code:
[FUNCTION f_onchar_create]
...
SRC.TIMERF 1,ALLSKILLS 50.0
SRC.SPELLEFFECT s_night_sight 100.0
SRC.GO 5183,1167,0
SRC.EVENTS +e_player
PS: "SRC.EVENTS +e_player" can be replaced with "EventsPlayer=e_player" on sphere.ini

maybe when I get some free time I can take a look on the code to check if the default stats/spells can be set before f_onchar_create to avoid values being replaced later, but for now TIMERF 1 is the best solution
(This post was last modified: 06-01-2017 02:47 PM by Coruja.)
06-01-2017 02:45 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: FUNCTION f_onchar_create not working? - Coruja - 06-01-2017 02:45 PM

Forum Jump:


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