I'll throw you a bone here :) Mckorr is great, but not so much of an expert at C++ as he is with other parts of the project.
So here's the deal -- printf is looking for extra parameters as void*, whereas strcat is looking for char*. In other words, it doesn't need a type cast to become void* from whatever it happens to be, to be used in printf. Luckily, EQADDR_SERVERNAME is defined as PCHAR, so your type cast (
(PCHAR)EQADDR_SERVERNAME) doesn't do anything and will work the same way with or without it.
The only thing I'd be concerned with is the return 14.
Code: Select all
* DWORD return value: Old "i++" value. e.g. number of chars to skip *
* in original string. Size of your parameter, *
* without the "$", and minus 1. $spawn(250,type) *
* should return 14. Returning 10000 indicates an *
* error return. (Bad macro parameter) *
* *
012345678901234
$spawn(250,type)
$servername
return 10 instead and your code should work as far as I know :)