Author Topic: how to create a function in the client  (Read 1303 times)

lug, can you help me with it?
Could i pm you my code?
Don't do it lug you'll confront the most broken and messy code ever

Don't do it lug you'll confront the most broken and messy code ever
im sure you are right

Don't do it lug you'll confront the most broken and messy code ever
i like this

i like chewing on stuffty code



no really when i get stuffty code i polish it and make it shine like a trophy
lug, can you help me with it?
Could i pm you my code?
send it over

The main problem is that your using the wrong arguments for commandtoclient:
commandtoclient(%target,'cleval(consolefunction);');
should be
commandtoclient(%target,'cleval','consolefunction');


But most importantly, using this script presents an extreme security vulnerability; any add-on released with this will be fail-binned, crap-on'd, the works.

The main problem is that your using the wrong arguments for commandtoclient:
commandtoclient(%target,'cleval(consolefunction);');
should be
commandtoclient(%target,'cleval','consolefunction');


But most importantly, using this script presents an extreme security vulnerability; any add-on released with this will be fail-binned, crap-on'd, the works.
commandtoclient(%target,'cleval',"consolefunction");
Notice the "
No integer there

commandtoclient(%target,'cleval',"consolefunction");
Notice the "
No integer there
" = string
' isnt always integer...

" = string
' isnt always integer...
'blah' is a tagged string and a tagged string is handeled as integer

Do echo(addtaggedstring("blahblah"));
Or commandtoserver(addtaggedstring("banban"),"blahblah...");

I suppose ' would work as long as the clientcmd called getTaggedString
But since creating a function would only need to be done once, using tagged strings would be pretty pointless

So yeah just use "

gettaggedstring takes an integer and returns a string