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






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
my personal (not working) nototitle system
Author Message
Crusader
Master
**

Posts: 254
Likes Given: 7
Likes Received: 19 in 12 posts
Joined: Apr 2012
Reputation: 6

Erehwon New Hera

Post: #1
my personal (not working) nototitle system
When i use this and go to dclick an npc or myself, the client freeze, it doesn't crash, but he doesn't allow me to do anything, i'm just stuck (like the client loops). WHY?!?

Code:
ON=@CHARDCLICK
src.tag.name.prefix
paperdoll // <- if i comment this, ofc, everything is working
IF ((<src.karma> >= -11000)&&(<src.karma> <= -9999))&&((<src.fame> >0)&&(<src.fame> < 1249))
    src.tag.nototitle L'<sex Emarginato/Emarginata>
    return 0
ELIF
[...]
ENDIF
return 1

[FUNCTION PAPERDOLL]
IF !(<ISEMPTY <ARGS>>)
    LOCAL.DTEXT=<UID.<ARGS>.TAG.NOTOTITLE> <UID.<ARGS>.NAME> <UID.<ARGS>.TITLE>
IF (<eval STRLEN(<LOCAL.DTEXT>)>>=60)
    local.text=<STRSUB 0 60 <UID.<ARGS>.TAG.NOTOTITLE> <UID.<ARGS>.NAME>, <UID.<ARGS>.TITLE>>
ELSE
    local.text=<STRSUB 0 <eval <eval STRLEN(<LOCAL.DTEXT>)>+1> <UID.<ARGS>.TAG.NOTOTITLE> <UID.<ARGS>.NAME>, <UID.<ARGS>.TITLE>>
ENDIF
local.p=088 // cmd
local.p=<local.p> D<ARGS> // char uid
local.p=<local.p> <asc <local.text>> // text
for <eval 59 - strlen(<local.dtext>)>
    local.p=<local.p> 00
endfor
local.p=<local.p> 0
SENDPACKET <LOCAL.P>
src.update
ELSE
    SRC.PAPERDOLL=<UID>
ENDIF
01-16-2013 07:15 PM
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: #2
RE: my personal (not working) nototitle system
Maybe it's this line

PHP Code:
for <eval 59 strlen(<local.dtext>)> 
    
local.p=<local.p00 
endfor 

From the code above, you can actually have a local.dtext with length >= 60 and so you'll get FOR -1 and then the possible crash ? mboh
(This post was last modified: 01-16-2013 07:56 PM by darksun84.)
01-16-2013 07:55 PM
Find all posts by this user Like Post Quote this message in a reply
Crusader
Master
**

Posts: 254
Likes Given: 7
Likes Received: 19 in 12 posts
Joined: Apr 2012
Reputation: 6

Erehwon New Hera

Post: #3
RE: my personal (not working) nototitle system
One more hint: this code was working before, with lesser clients and previous version of sphere56.
Now i'm using client 7.0.6.4... and last nightly release of sphere.
01-16-2013 09:11 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: #4
RE: my personal (not working) nototitle system
Hint? This ain't a game show...

If it ran before and now doesn't I suggest you add some debug messages to see exactly where it is freezing

[Image: 2nis46r.jpg]
01-16-2013 10:31 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Crusader
Master
**

Posts: 254
Likes Given: 7
Likes Received: 19 in 12 posts
Joined: Apr 2012
Reputation: 6

Erehwon New Hera

Post: #5
RE: my personal (not working) nototitle system
Quote:Hint? This ain't a game show...

i have a good knowledge of english language...but sometimes i still miss something and fail to clearly express something... like in this case Tongue

Quote:If it ran before and now doesn't I suggest you add some debug messages to see exactly where it is freezing

point is that client freeze, not server...no error message are showed....i try to put some debug into for cycle, and re-edit this post, brb Smile


edit: problem is in the sendpacket, when i do " SENDPACKET <LOCAL.P> "


the packet i send is:

088 D01ac7 049 06c 020 044 069 073 074 069 06e 074 06f 020 042 072 069 065 072 02c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0

where 088 is the packet number, D<01act> is the human npc uid that i just dclicked.
(This post was last modified: 01-17-2013 12:57 AM by Crusader.)
01-16-2013 10:51 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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