Skorm Posted June 4, 2013 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
Skorm Posted June 4, 2013 Author 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
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 Skorm2 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.