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
help me to remember
Author Message
mrkarlo
Journeyman
*

Posts: 160
Likes Given: 3
Likes Received: 6 in 5 posts
Joined: Mar 2012
Reputation: 1



Post: #11
RE: help me to remember
please explain me what this
Code:
+50> >
means
07-12-2014 07:59 AM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #12
RE: help me to remember
It would be better with some parentheses

Quote:IF (<EVAL <EVAL <LOCAL.SKILL> / 10> + 50> > <EVAL <LOCAL.RAND>>)

IF (<EVAL (<LOCAL.SKILL> / 10>) + 50> > <EVAL <LOCAL.RAND>>)

It's pretty basic math

You are adding 50 to whatever local.skill /10 equals.

[Image: 2nis46r.jpg]
07-14-2014 01:22 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
mrkarlo
Journeyman
*

Posts: 160
Likes Given: 3
Likes Received: 6 in 5 posts
Joined: Mar 2012
Reputation: 1



Post: #13
RE: help me to remember
oh thanks. That what I need to know!


Code:
IF (<LOCAL.SKILL> > 50)                                                     
    LOCAL.RAND = <EVAL Rand(<EVAL Rand(100, 150)>, 400)>
    IF (<EVAL <EVAL <LOCAL.SKILL> / 10> + 50> > <EVAL <LOCAL.RAND>>)         // 50.1 <----------------------

50/10=5 + 50 = 55 ? Hmm
(This post was last modified: 07-14-2014 04:47 AM by mrkarlo.)
07-14-2014 04:17 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #14
RE: help me to remember
No, 2+2=5

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
07-14-2014 07:53 AM
Find all posts by this user Like Post Quote this message in a reply
mrkarlo
Journeyman
*

Posts: 160
Likes Given: 3
Likes Received: 6 in 5 posts
Joined: Mar 2012
Reputation: 1



Post: #15
RE: help me to remember
yee, interesting theory Big Grin but what about my last post?
07-15-2014 04:23 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: #16
RE: help me to remember
<EVAL <EVAL <LOCAL.SKILL> / 10> + 50> > <EVAL <LOCAL.RAND>>)

Each EVAL englobes the values inside, just like using ( )... so everything inside it's brackets will be calc alone, so ...

RED = LOCAL.SKILL / 10
TOTAL = <EVAL RED+50>

This is important because without using <eval > or () the maths can go weird since they are giving it some 'sense'.

In this case yes, result = 55.
07-15-2014 09:25 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes XuN's post
mrkarlo
Journeyman
*

Posts: 160
Likes Given: 3
Likes Received: 6 in 5 posts
Joined: Mar 2012
Reputation: 1



Post: #17
RE: help me to remember
thank you overlord! I have the last question in this topic. If I want (at least) to lumber only with 75.1 skill -
Code:
IF (<LOCAL.SKILL> > 50)                                                     
    LOCAL.RAND = <EVAL Rand(<EVAL Rand(100, 150)>, 400)>
    IF (<EVAL <EVAL <LOCAL.SKILL> / 10> + 50> > <EVAL <LOCAL.RAND>>)

tell me please, how to calculate?
07-16-2014 01:54 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: #18
RE: help me to remember
if (<local.skill> > 75) Should do it, I don't know how do you store the local.skill value.
07-16-2014 03:27 AM
Find all posts by this user Like Post Quote this message in a reply
mrkarlo
Journeyman
*

Posts: 160
Likes Given: 3
Likes Received: 6 in 5 posts
Joined: Mar 2012
Reputation: 1



Post: #19
RE: help me to remember
LOCAL.SKILL = <SRC.LUMBERJACKING>
07-16-2014 04:16 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: #20
RE: help me to remember
Then:

IF (<local.skill> > 750)
07-16-2014 06:08 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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