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
Forchars miscount
Author Message
Mordaunt
Super Moderator
****

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



Post: #1
Forchars miscount
Code:
[function p_count]
forclients 18
   local.count +=1
   serv.b <local.count>
endfor

I always get 1 more returned than is actually present. Can anyone tell me why the person calling the function is counted twice?

[Image: 2nis46r.jpg]
(This post was last modified: 10-03-2012 05:52 AM by Mordaunt.)
10-03-2012 05:50 AM
Visit this user's website 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: #2
RE: Forchars miscount
This happen with forchars too lol
Thats nice =D

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.
10-03-2012 06:42 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: #3
RE: Forchars miscount
Yeah.. I know

[Image: 2nis46r.jpg]
10-03-2012 07:37 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
htid4life
Journeyman
*

Posts: 162
Likes Given: 27
Likes Received: 4 in 3 posts
Joined: Mar 2012
Reputation: 2



Post: #4
RE: Forchars miscount
so knowin the problem just take 1 off from the result lol

[Image: htid.jpg]
10-03-2012 07:06 PM
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: #5
RE: Forchars miscount
Yes that is what I am presently doing but the point is... it shouldn't do that....

[Image: 2nis46r.jpg]
10-03-2012 11:57 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #6
RE: Forchars miscount
With forchars i get the right number Shock
10-04-2012 02:14 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: #7
RE: Forchars miscount
You know, strangely I am now getting the right numbers, and I didn't change a thing since yesterday.

[Image: 2nis46r.jpg]
10-04-2012 04:27 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #8
RE: Forchars miscount
don't put function into sub-subfolder, there is a bug with subfolders and for loops but i can't reproduce it all times Big Grin

http://tracker.sphere.torfo.org/bugs/view.php?id=2043
(This post was last modified: 10-04-2012 12:19 PM by Shaklaban.)
10-04-2012 12:18 PM
Visit this user's website 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)