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
Exp System - Doesn't work from 0.56b to 0.56d
Author Message
Coruja
Sphere Developer
*****

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

Dimension Shard

Post: #8
RE: Exp System - Doesn't work from 0.56b to 0.56d
I guess you found the problem. After debug the code you got this
Code:
the REF1 value is "0" (0) and DEF.LevelCap value is ""

So REF1 doesn't exist and DEF.LevelCap is a null value, and this will make sphere read this next line
Code:
IF (<Ref1.ISPLAYER>) && (<Ref1.tag0.levelUp> < <def.levelCap>)
as
Code:
IF () && ( < )
As you can see, there's no error on "&&" but without REF1 and DEF.LevelCap values the code will get completely messed and will return "undefined symbol" console error

Anyway, the trigger @DeathCorpse is called after the char is already dead and with the corpse on ground. Since your script don't need the corpse, you can replace @DeathCorpse with @Death, which is called ~before~ the char die, and this will probably make the code set the REF1 value correctly
Code:
[EVENTS e_exp_gain]
REF1=<ATTACKER.MAX>  // give experience to the attacker that caused most damage
IF (<REF1>)
   ...
ENDIF

Also don't forget that sphere already have an native EXP/LEVEL system which works without any script required, and you can enable and customize it just changing some few settings on sphere.ini. Since your script is really simple, maybe it's better just use the sphere EXP/LEVEL system instead
09-12-2019 05:06 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Exp System - Doesn't work from 0.56b to 0.56d - Coruja - 09-12-2019 05:06 AM

Forum Jump:


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