The online racing simulator
Can't add things for insim
(4 posts, started )
Can't add things for insim
Hi

FIRST: I donwloaded the example for insim, I add 1 thing and nothing...

When I edit the Form1 in solution, I add 1 thing and dont take any effect.

See:

// A new client joined the server.
private void NCN_ClientJoinsHost(Packets.IS_NCN NCN)
{
AddToConnectionsList(NCN); // Update Connections[] list

// Your code here

I edit it to:

// A new client joined the server.
private void NCN_ClientJoinsHost(Packets.IS_NCN NCN)
{
[B]InSim.Send_BTN_CreateButton("^7Welcome to this server!", Flags.ButtonStyles.ISB_LEFT | Flags.ButtonStyles.ISB_DARK | Flags.ButtonStyles.ISB_DARK, 6, 35, 20, 20, 50, NCN.UCID, 40, false)[/B];
AddToConnectionsList(NCN); // Update Connections[] list

// Your code here

And when I compile with F6 dont take any effect...

Any help?
Try pressing F5 instead.
#3 - Silox
No, the error is that you output the button, before the player gets added to the array who contains the Unique ID for the joining player where the button will be send to.

Try this instead:

// A new client joined the server.
private void NCN_ClientJoinsHost(Packets.IS_NCN NCN)
{

AddToConnectionsList(NCN); // Update Connections[] list

InSim.Send_BTN_CreateButton("^7Welcome to this server!", Flags.ButtonStyles.ISB_LEFT | Flags.ButtonStyles.ISB_DARK | Flags.ButtonStyles.ISB_DARK, 6, 35, 20, 20, 50, NCN.UCID, 40, false);


As DarkTimes said: It's easier to test a program when you press F5. It won't be compiled, but saved in a 'debug map'.

If the program crashes, you'll get more information about the crash.
Thanks ! It works now
Attached images
thanks.jpg

Can't add things for insim
(4 posts, started )
FGED GREDG RDFGDR GSFDG