Server Help

Bot Questions - Say Players Name

Stud^ - Sat Nov 22, 2003 5:52 am
Post subject: Say Players Name
I need some help i am trying to get my bot to say a player's name when the enter here the code
Quote:
case EVENT_PlayerEntering:
{
Player *p = (Player*)event.p[0];

sendPrivate(p, "Hello "+ p->name +"Welcome To Sub Warz Try To Enjoy Yourself);

}

ExplodyThingy - Sat Nov 22, 2003 12:26 pm
Post subject:
Ill bet its saying it cannot add two pointers. Try this:

string s = "Hello, ";
s+=p->name;
s+=". Welcome to ........";
sendPrivate(p,s);
Anonymous - Sat Nov 22, 2003 1:26 pm
Post subject:
Code: Show/Hide

case EVENT_PlayerEntering:
{
Player *p = (Player*)event.p[0];

sendPrivate(p, "Hello "+ (String) p->name +" Welcome To Sub Warz Try To Enjoy Yourself);

}

Cyan~Fire - Sat Nov 22, 2003 1:32 pm
Post subject:
There's no closing " to the 2nd string.
Stud^ - Fri Nov 28, 2003 5:22 am
Post subject:
Thanks Guys It works perfectly you rock icon_smile.gif icon_biggrin.gif
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group