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
statlock problem
Author Message
ograso
Journeyman
*

Posts: 135
Likes Given: 10
Likes Received: 2 in 2 posts
Joined: May 2014
Reputation: 0



Post: #1
statlock problem
Hey all,

I receive an errors on console as follow. Statchange using in player event.

Code:
ERROR:(e_player.scp,131)Can't resolve <STATLOCK[3]>
ERROR:(e_player.scp,131)Undefined symbol ''
ERROR:(e_player.scp,134)Can't resolve <STATLOCK[3]>
ERROR:(e_player.scp,134)Undefined symbol ''

Any idea?


Code:
ON=@StatChange
IF (<TAG0.OVERRIDE.STATSUM>)
LOCAL.STATSUM=<TAG0.OVERRIDE.STATSUM>
ELSE
LOCAL.STATSUM=<SERV.SKILLCLASS.0.STATSUM>
ENDIF
LOCAL.STATS=<EVAL <OSTR>+<ODEX>+<OINT>>
IF (<LOCAL.STATS> == <LOCAL.STATSUM>)
    IF (<STATLOCK[<ARGN1>]> == lock_locked)         // Line 131
    RETURN 1
    ENDIF
    IF (<STATLOCK[<ARGN1>]> == lock_up)              // Line 134
        FOR 0 2
            IF (<LOCAL._FOR> != <ARGN1>)
                IF (<STATLOCK[<dLOCAL._FOR>]> == lock_down)
                    IF (<LOCAL._FOR> == 0)
                        IF (<EVAL <OSTR>-1> > 0)
                        OSTR --
                        MAXHITS --
                            IF (<ARGN1> == 0)
                            MAXHITS += <EVAL <ARGN2>-<OSTR>>
                            ELIF (<ARGN1> == 1)
                            MAXMANA += <EVAL <ARGN2>-<OINT>>
                            ELIF (<ARGN1> == 2)
                            MAXSTAM += <EVAL <ARGN2>-<ODEX>>
                            ENDIF
                        RETURN 0
                        ENDIF
                    ELIF (<LOCAL._FOR> == 1)
                        IF (<EVAL <OINT>-1> > 0)
                        OINT --
                        MAXMANA --
                            IF (<ARGN1> == 0)
                            MAXHITS += <EVAL <ARGN2>-<OSTR>>
                            ELIF (<ARGN1> == 1)
                            MAXMANA += <EVAL <ARGN2>-<OINT>>
                            ELIF (<ARGN1> == 2)
                            MAXSTAM += <EVAL <ARGN2>-<ODEX>>
                            ENDIF
                        RETURN 0
                        ENDIF
                    ELIF (<LOCAL._FOR> == 2)
                        IF (<EVAL <ODEX>-1> > 0)
                        ODEX --
                        MAXSTAM --
                            IF (<ARGN1> == 0)
                            MAXHITS += <EVAL <ARGN2>-<OSTR>>
                            ELIF (<ARGN1> == 1)
                            MAXMANA += <EVAL <ARGN2>-<OINT>>
                            ELIF (<ARGN1> == 2)
                            MAXSTAM += <EVAL <ARGN2>-<ODEX>>
                            ENDIF
                        RETURN 0
                        ENDIF
                    ENDIF
                RETURN 1
                ENDIF
            ENDIF
        ENDFOR    
    RETURN 1
    ENDIF
ELIF (<LOCAL.STATS> < <LOCAL.STATSUM>)
    IF (<ARGN1> == 0)
    MAXHITS += <EVAL <ARGN2>-<OSTR>>
    ELIF (<ARGN1> == 1)
    MAXMANA += <EVAL <ARGN2>-<OINT>>
    ELIF (<ARGN1> == 2)
    MAXSTAM += <EVAL <ARGN2>-<ODEX>>
    ENDIF
ENDIF
03-23-2015 12:04 AM
Find all posts by this user Like Post Quote this message in a reply
Shamino
Noob Scripter
*

Posts: 57
Likes Given: 5
Likes Received: 15 in 11 posts
Joined: Mar 2012
Reputation: 0

Exilio UO

Post: #2
RE: statlock problem
Try...

<STATLOCK.<ARGN1>>
or
<STATLOCK(<ARGN1>)>
or
<STATLOCK.(<ARGN1>)>

STATLOCK.stat_id RW Gets or sets the lock state of the player's STR (0), DEX (2) or INT (1). [0 = up, 1 = down, 2 = locked]

"My world is hell for the infidels. My blood pleasure of the immortals"
[Image: 2ec003662b15c61da117767a59bb99bao.jpg]
(This post was last modified: 03-23-2015 12:49 AM by Shamino.)
03-23-2015 12:48 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
ograso
Journeyman
*

Posts: 135
Likes Given: 10
Likes Received: 2 in 2 posts
Joined: May 2014
Reputation: 0



Post: #3
RE: statlock problem
Nope, unfortunately. I tried all of them but none of above isnt correct
03-23-2015 02:47 AM
Find all posts by this user Like Post Quote this message in a reply
Shamino
Noob Scripter
*

Posts: 57
Likes Given: 5
Likes Received: 15 in 11 posts
Joined: Mar 2012
Reputation: 0

Exilio UO

Post: #4
RE: statlock problem
Ok, i found, try this.

<STATLOCK[STR]>
<STATLOCK[DEX]>
<STATLOCK[INT]>

"My world is hell for the infidels. My blood pleasure of the immortals"
[Image: 2ec003662b15c61da117767a59bb99bao.jpg]
03-23-2015 03:16 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Shamino's post
ograso
Journeyman
*

Posts: 135
Likes Given: 10
Likes Received: 2 in 2 posts
Joined: May 2014
Reputation: 0



Post: #5
RE: statlock problem
Yeah its done Shamino. Thank you
03-23-2015 04:08 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: statlock problem
ERROR:(e_player.scp,131)Can't resolve <STATLOCK[3]>

+

STATLOCK.stat_id RW Gets or sets the lock state of the player's STR (0), DEX (2) or INT (1). [0 = up, 1 = down, 2 = locked]

=

if (<argn>> 2)//no value higher than 2 can be passed to <statlock[]>
return
endif
03-23-2015 06:39 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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