ID:266507
 
mob/verb/Test2()
var/pre=copytext(usr.name,1,1/2)
world<<"[pre]"


thats ma code but it still show the entire name y?
The third argument of copytext is the text character position right after the last character to be copied. If you leave it as 0, the entire text will be copied.

copytext("cat",1,0) will return "cat"
copytext("cat",1,3) will return "ca"
copytext("cat",1,2) will return "c"

You entered 1/2. I am guessing this will be read as 0. It is looking for an integer.

[edit]
After realizing the second argument was missing, ACWraith tripped and fell into a pit of spikes while attempting to avoid former Next Generation victims.
In response to ACWraith
Fo u know how i would split the name in half
In response to Strange Kidd
proc/ShowHalves(message = "SuperDuperMonkeyFluper")
var/first_half = copytext(message,1,length(message)/2)
var/second_half = copytext(message,length(message)/2,length(message))
usr << first_half
usr << second_half
That should do it.
In response to Foomer
proc/ShowHalves(message = "SuperDuperMonkeyFluper")
var/first_half = copytext(message,1,length(message)/2)
var/second_half = copytext(message,length(message)/2,length(message))
usr << first_half
usr << second_half</DM>That should do it.

it said it was a undifined arg type
In response to Strange Kidd
Then declare it like a normal var instead.