Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Biller Coding Yay

 
Post new topic   Reply to topic Printable version
 View previous topic  ssb2 setup Post :: Post Hosting Zone  View next topic  
Author Message
Contempt+
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: May 15 2005
Posts: 682
Location: Home
Offline

PostPosted: Wed Oct 29, 2008 12:17 am    Post subject: Biller Coding Yay Reply to topic Reply with quote

error C2679: binary '+=' : no operator defined which takes a right-hand operand of type 'unsigned char [32]'

Trying to do:
Code: Show/Hide
s += player->player->Name;

And i get the error above.

What i'm trying to do is change the ?login on CatID's biller so that it says:
Login successful. Welcome back <username>. So in my case, Welcome back Contempt+.
_________________
SSE Network Administrator
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Wed Oct 29, 2008 12:29 am    Post subject: Reply to topic Reply with quote

1st glance,
player->name instead of
player->player->name?


or perhaps you cant strcat strings with +...
your compiler wouldnt allow it

like A + E != AE
_________________
SSC Distension Owner
SSCU Trench Wars Developer
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Contempt+
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: May 15 2005
Posts: 682
Location: Home
Offline

PostPosted: Wed Oct 29, 2008 12:41 am    Post subject: Reply to topic Reply with quote

I'm using MSVC 6.0.. And player->Name doesn't exist.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Wed Oct 29, 2008 1:07 am    Post subject: Reply to topic Reply with quote

You can't use += with a char array...
Nothing to do with the compiler, but more with the language itself.
It works in MervBot when you use the String class, but it never works with char[]
You need to use strcat(char *, char *)
google some for help on it. But basically, one of the arguments is const, which is the string you want appended, and the other one is the string to which you want to append stuff
strcat(s, player->player->Name);
or something like that
_________________
(Insert a bunch of dead links here)
Back to top
View users profile Send private message Add User to Ignore List
Contempt+
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: May 15 2005
Posts: 682
Location: Home
Offline

PostPosted: Wed Oct 29, 2008 1:17 am    Post subject: Reply to topic Reply with quote

So pretty much, just make the whole string strcat?

EDIT: There's no other way to do it?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Wed Oct 29, 2008 6:12 am    Post subject: Reply to topic Reply with quote

Contempt+ wrote:
EDIT: There's no other way to do it?


It's C++, there's a billion ways to do anything. Using strcat is just the most direct.
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Contempt+
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: May 15 2005
Posts: 682
Location: Home
Offline

PostPosted: Wed Oct 29, 2008 12:44 pm    Post subject: Reply to topic Reply with quote

Hmm, I'm a newbie with coding. Anyone have a link or a reference I can look at so I can implement it?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Wed Oct 29, 2008 1:10 pm    Post subject: Reply to topic Reply with quote

http://en.wikipedia.org/wiki/Strcat

Quote:
The name strcat is an abbreviation of "string concatenate". strcat is found in the string.h header file.
Make sure to include it
Back to top
View users profile Send private message Add User to Ignore List
Contempt+
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: May 15 2005
Posts: 682
Location: Home
Offline

PostPosted: Wed Oct 29, 2008 1:28 pm    Post subject: Reply to topic Reply with quote

Well, the biller uses strings all throughout the src, so string.h is in the header.

Only problem is, my dumb ass can't figure it out haha.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> General Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 13 page(s) served in previous 5 minutes.

phpBB Created this page in 0.524235 seconds : 33 queries executed (93.8%): GZIP compression disabled