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-nmm6 (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-nmm6 (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-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What's wrong with this IF?
Author Message
Baeguth
Apprentice
*

Posts: 12
Likes Given: 4
Likes Received: 0 in 0 posts
Joined: Aug 2017
Reputation: 0



Post: #1
What's wrong with this IF?
HellO!

PHP Code:
ON=@GETHIT
    
//---------------------PARRY CHECK---------------------------//
    
I.SAY @22 <I.HASPARRIED>
    IF ( <
I.HASPARRIED> > 33 )  
        
//Parrying successful 
        
I.MESSAGE @030 You parried <SRC.NAMEblow
        
ARGN1 //SET DAMAGE TO 1
        
I.EFFECT 3,i_fx_glow,10,16
    
ENDIF 


This is my trigger.
The say is just for debug. It correctly returns the value 33 or 66, depends on what inside the functions.

Here is the function:

PHP Code:
[FUNCTION HASPARRIED]
    IF (<
FINDLAYER.layer_hand2.ISARMOR>)   //check (again) if there is a shield equipped
        
LOCAL.PARRY = <getPercentage <EVAL <PARRYING>> <DEF0.S_MAXPARRYCHANCE>>> //get the parry chance
        
LOCAL.RAND = <R1,100>
        IF (<
TAG0.ISJAGGERNAUT>)
            
LOCAL.PARRY = <DLOCAL.PARRY> + <DEF0.JAGGERNAUTBONUS>
        ENDIF
            
//---------------------PARRY CHECK---------------------------//
        
IF (<EVAL <LOCAL.RAND>> <= <EVAL <LOCAL.PARRY>>)  
            RETURN 
66
        
ELSE
            RETURN 
33
        
ENDIF
    ENDIF 


the error is:

PHP Code:
14:25:ERROR:(BasePlayerEvent.scp,64)Undefined symbol '' ['> 33 )'


help! This is driving me crazy!
08-13-2017 10:28 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
What's wrong with this IF? - Baeguth - 08-13-2017 10:28 PM
RE: What's wrong with this IF? - Baeguth - 08-13-2017, 11:28 PM
RE: What's wrong with this IF? - Ben - 08-14-2017, 02:35 AM
RE: What's wrong with this IF? - Baeguth - 08-14-2017, 05:27 PM

Forum Jump:


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