Skorm Posted June 4, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Sunday at 10:43 PM Share Posted June 4, 2013 (edited) This might sound like a stupid question but I'm new to source so stay with me! I would like to do something like this. mob_once_spawn(BL_CAST(BL_PC, src),src->m,src->x+_x,src->y+_y,"("+sd->status.name+")"+"Monster",1001,1,"",SZ_SMALL,AI_NONE); But "("+sd->status.name+")"+"Monster" doesn't work. I've also tried StringBuf_AppendStr(sd->status.name, "Monster"). I'm really not sure how to use it though. Edited June 4, 2013 by Skorm Quote Link to comment Share on other sites More sharing options...
goddameit Posted June 4, 2013 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Share Posted June 4, 2013 use sprintf to mix your string 1 Quote Link to comment Share on other sites More sharing options...
Skorm Posted June 4, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Sunday at 10:43 PM Author Share Posted June 4, 2013 (edited) use sprintf to mix your string It probably would've helped a little more had you shown me an example with the information I provided but I was able to piece everything together. char output[128]; sprintf(output, "(%s)Monster", status_get_name(src)); mob_once_spawn(BL_CAST(BL_PC, src),src->m,src->x+_x,src->y+_y,output,1001,1,"",SZ_SMALL,AI_NONE); Edited June 4, 2013 by Skorm Quote Link to comment Share on other sites More sharing options...
Question
Skorm
This might sound like a stupid question but I'm new to source so stay with me!
I would like to do something like this.
But "("+sd->status.name+")"+"Monster" doesn't work.
I've also tried StringBuf_AppendStr(sd->status.name, "Monster").
I'm really not sure how to use it though.
Edited by SkormLink to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.