Author Topic: Getting the number of divisions in the paint set  (Read 1140 times)

I'm making a script which uses "getSprayCanDivisionSlot(int index)" to find the X and Y coordinates of a given color within the paint set. However, that function gives a console error if the given index is invalid, and I can't find an equivalent function to get the number of divisions directly.

Does anyone know if such a function exists, or will I just have to come up with some hacky way of detecting this problem?

You could try using the paint gui to get the rowcount, there must be a way.

Trace the console to find out how the row/column count is sent to the client.
Probably trace it when you spawn or something.

I know the function for creating the Tool HUD is clientCmdPlayGUI_CreateToolHUD(%slotcount);


You could try using the paint gui to get the rowcount, there must be a way.

This needs to work server-sided. Including dedicated servers.


Trace the console to find out how the row/column count is sent to the client.
Probably trace it when you spawn or something.

I know the function for creating the Tool HUD is clientCmdPlayGUI_CreateToolHUD(%slotcount);

Tried that, didn't reveal anything. Tried scouring through consoleDumpFunctions, too.

it's possible that nexus worked with this. contact him, he doesn't browse coding help i think

he doesn't browse coding help i think
Sure he does. He's helped me out sometimes in Coding Help.

It may be a variable.


lol
what? he's right. you'd be amazed the kinds of stuff that's stored in variables. export("*", "config/variables.txt");

what? he's right. you'd be amazed the kinds of stuff that's stored in variables. export("*", "config/variables.txt");

Tried it. Nothing interesting before the point at which the server crashed. (You can crash from exporting too much at once.)

You can crash from exporting too much at once.
Since when?
My chatbot regularly exports all it's data, which is currently over 2mb, without even a slow down.

ffff-

2mb for a chatbot???

wtf are you storing??

It's a markov chain chatbot, and I've had it learning off my server's chat for weeks.
So tons of links between words.
Also the variable names could be shortened in length a bit, though I'm pretty sure that doesn't effect exec time as much as line count does.

Tried it. Nothing interesting before the point at which the server crashed. (You can crash from exporting too much at once.)
bullstuff.

HA
HAHA

i found it

$Paint_NumPaintRows