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
test name
Author Message
jdchixin
Journeyman
*

Posts: 51
Likes Given: 9
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 0



Post: #1
test name
[FUNCTION f_name_check]
FORPLAYERS 100
if (strmatch("<src.name>","<name>"))
src.sysmessage That name is not available
// src.say 111
endif
ENDFOR

is not word
02-23-2013 03:53 PM
Find all posts by this user Like Post Quote this message in a reply
Chris_T
Apprentice
*

Posts: 10
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Nov 2012
Reputation: 0



Post: #2
RE: test name
You could try using STRCMPI
IF !(STRCMPI("<src.name>","<name>"))


Spherewiki:
Quote:Return Value Meaning
-1 string1 is less than string2
0 The two strings are equal
1 string1 is greater than string2
02-24-2013 02:23 PM
Find all posts by this user Like Post Quote this message in a reply
Ultima One
Journeyman
*

Posts: 238
Likes Given: 7
Likes Received: 10 in 6 posts
Joined: Jan 2013
Reputation: 6

Ultima One

Post: #3
RE: test name
(02-24-2013 02:23 PM)Chris_T Wrote:  You could try using STRCMPI
IF !(STRCMPI("<src.name>","<name>"))


Spherewiki:
Quote:Return Value Meaning
-1 string1 is less than string2
0 The two strings are equal
1 string1 is greater than string2

It should read:

IF (STRCMPI(<src.name>,<name>) == 0)

using the ! will make 0 and -1 both go in to the if statement. You only want to go in if the strings match, which must == 0.

Also no need for quotes here. It will just add quotes to both names and include them in the check.

ULTIMA ONE
The modern, sphere powered Ultima Online server
(This post was last modified: 02-27-2013 03:34 AM by Ultima One.)
02-27-2013 03: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: 1 Guest(s)