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
speech
Author Message
Art
Journeyman
*

Posts: 118
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2012
Reputation: 0



Post: #1
speech
Code:
[spk_player]

ON=**

tag.key = <args>

If somebody will use symbols like /, server will give message about error 'Exp_GetVal: Divide by 0', or = + -, server will give messages like 'Undefined symbol'.

How i can solve problem?
(This post was last modified: 08-20-2012 08:55 PM by Art.)
08-20-2012 07:21 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: #2
RE: speech
on=*
try this

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.
08-20-2012 07:48 AM
Find all posts by this user Like Post Quote this message in a reply
Art
Journeyman
*

Posts: 118
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2012
Reputation: 0



Post: #3
RE: speech
Same thing =\
08-20-2012 08:55 PM
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: #4
RE: speech
its bug of a sphere, its tries to evaluate everything. you can block this characters in speech.

im also have that problem. sometimes i want to use db.escapedata function on speech, but strings are evalauted even with insde " ".
(This post was last modified: 08-20-2012 10:02 PM by Shaklaban.)
08-20-2012 08:57 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #5
RE: speech
Ah ya, mathematical algorithms do that everytime you compare one using a statement. (IF/ELSEIF/WHILE/FOR/etc). You can work around it by converting the characters to <ASC> and storing into a LOCAL, compare the LOCAL in your statements and return <ARGS> as you need to (after all comparisons are complete).

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
08-20-2012 11:33 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Art
Journeyman
*

Posts: 118
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2012
Reputation: 0



Post: #6
RE: speech
May i ask for example please?

I tried
local.str = <args>

it contain error too. I need record speech string to 'tag' on character.
08-20-2012 11:38 PM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #7
RE: speech
sure
Code:
[FUNCTION char_parse]
LOCAL.ARGS=<ARGS>x
WHILE (<EVAL <STRPOS -1 <STRSUB -1 1 <LOCAL.ARGS>> <LOCAL.ARGS>> +1> >= <dLOCAL.X>)
    LOCAL.ASC=<ASC <STRSUB <dLOCAL.X> 1 <LOCAL.ARGS>>>
    IF (<LOCAL.ASC>==022) || (<LOCAL.ASC>==023) || (<LOCAL.ASC>==025) || (<LOCAL.ASC>==026) || (<LOCAL.ASC>==027) || (<LOCAL.ASC>==028) || (<LOCAL.ASC>==029) || (<LOCAL.ASC>==02A) || (<LOCAL.ASC>==02B) || (<LOCAL.ASC>==02C) || (<LOCAL.ASC>==02D) || (<LOCAL.ASC>==02F) || (<LOCAL.ASC>==03C) || (<LOCAL.ASC>==03D) || (<LOCAL.ASC>==03E) || (<LOCAL.ASC>==05E) || (<LOCAL.ASC>==07C) || (<LOCAL.ASC>==07E)
        IF (STRMATCH(<LOCAL.RETURN>,0))
            LOCAL.RETURN=<ASC <STRSUB <dLOCAL.X> 1 <LOCAL.ARGS>>>
        ELSE
            LOCAL.RETURN=<LOCAL.RETURN><ASC <STRSUB <dLOCAL.X> 1 <LOCAL.ARGS>>>
        ENDIF
    ELSE
        IF (STRMATCH(<LOCAL.RETURN>,0))
            LOCAL.RETURN=<STRSUB <dLOCAL.X> 1 <LOCAL.ARGS>>
        ELSE
            LOCAL.RETURN=<LOCAL.RETURN><STRSUB <dLOCAL.X> 1 <LOCAL.ARGS>>
        ENDIF
    ENDIF
    LOCAL.X += 1
ENDWHILE
RETURN <STRSUB 0 <EVAL <EVAL STRLEN(<LOCAL.RETURN>)> +-1> <LOCAL.RETURN>>
So with this, you would use is like so:
Code:
[speech spk_player]
on=*
local.args=<char_parse <args>>
if (strmatch(<local.args>,test))
say=<args>
endif
It's just a quick work around, if you want to compare math algorithms using strmatch you can do something like:
Code:
local.args=<char_parse <args>>
local.cmp=<char_parse />
if (strmatch(<local.args>,<local.cmp>))
say=compared.
endif

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
08-20-2012 11:51 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Art
Journeyman
*

Posts: 118
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2012
Reputation: 0



Post: #8
RE: speech
Woah, much code for small problem =\
08-21-2012 12:56 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: #9
RE: speech
I still do not understand your problem...

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.
08-21-2012 01:14 AM
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: #10
RE: speech
[spk_player]
ON=**
tag.key = <args>


just put that on speech than in game write something like: 0/0 etc. you will see his problem on console Big Grin sphere tries to calculate player speech which is must be a string, not integer. when we can assign the args we can use " " but when sphere assign args we can't do much.
(This post was last modified: 08-21-2012 01:36 AM by Shaklaban.)
08-21-2012 01:33 AM
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: 4 Guest(s)