The online racing simulator
LsGO InSim UniqueID Help
(5 posts, started )
LsGO InSim UniqueID Help
(MOVE IF IN WRONG SECTION)

Hi,

I have recently wanted to make a Cruise Insim with a LsGO base. Then i encounterd a problem. For example :
InSim.Send_BTN_CreateButton("^7Welcome to ^5Kinder^7Garten", Flags.ButtonStyles.ISB_LIGHT, 7, 98, 51, 51, 132, Conn.UniqueID, 2, false);

As you can see the id is 132. In the LsGO InSim when i type this :
InSim.Send_BTN_CreateButton("^7Welcome to ^5Kinder^7Garten", Flags.ButtonStyles.ISB_LIGHT, 7, 98, 51, 51, 300, Conn.UniqueID, 2, false);

300 Or above it gives me a error :
The best overloaded method match for 'LFS_External.InSim.InSimInterface.Send_BTN_CreateButton(string, LFS_External.InSim.Flags.ButtonStyles, byte, byte, byte, byte, byte, byte, byte, bool)' has some invalid arguments

Argument 7: cannot convert from 'int' to 'byte'

and what im trying to figure out is how to get the ID higher then 300, i couldent find a way to do this so that's why i am asking help on the forums. Thanks!
Yoran
Quote from yoran765 :(MOVE IF IN WRONG SECTION)

Hi,

I have recently wanted to make a Cruise Insim with a LsGO base. Then i encounterd a problem. For example :
InSim.Send_BTN_CreateButton("^7Welcome to ^5Kinder^7Garten", Flags.ButtonStyles.ISB_LIGHT, 7, 98, 51, 51, 132, Conn.UniqueID, 2, false);

As you can see the id is 132. In the LsGO InSim when i type this :
InSim.Send_BTN_CreateButton("^7Welcome to ^5Kinder^7Garten", Flags.ButtonStyles.ISB_LIGHT, 7, 98, 51, 51, 300, Conn.UniqueID, 2, false);

300 Or above it gives me a error :
The best overloaded method match for 'LFS_External.InSim.InSimInterface.Send_BTN_CreateButton(string, LFS_External.InSim.Flags.ButtonStyles, byte, byte, byte, byte, byte, byte, byte, bool)' has some invalid arguments

Argument 7: cannot convert from 'int' to 'byte'

and what im trying to figure out is how to get the ID higher then 300, i couldent find a way to do this so that's why i am asking help on the forums. Thanks!
Yoran

Hi Yoran:

After quickly looking online, 300 is out of range for a byte. in C#, a byte can contain the values from 0 - 255. Is there another method that's overloaded that accepts a different type such as int (By the looks of the error, this isn't the case.) Furthermore, if this is the LFS "ClickId" (I'm unsure as I haven't used LFS_External -- but it's a reasonable guess), LFS limits this value between 0 - 239.

Also, LFS External is pretty old and outdated (and abandoned as well AFAIK). It might be worthwhile (if you have the programming knowledge and ability) to port it from LFS External to a different Insim base.

Hope this all helps
Quote from dawesdust_12 :Hi Yoran:

After quickly looking online, 300 is out of range for a byte. in C#, a byte can contain the values from 0 - 255. Is there another method that's overloaded that accepts a different type such as int (By the looks of the error, this isn't the case.) Furthermore, if this is the LFS "ClickId" (I'm unsure as I haven't used LFS_External -- but it's a reasonable guess), LFS limits this value between 0 - 239.

Also, LFS External is pretty old and outdated (and abandoned as well AFAIK). It might be worthwhile (if you have the programming knowledge and ability) to port it from LFS External to a different Insim base.

Hope this all helps

Thanks for the quick reply! Well i don't really have any programming knowledge but i guess i have to use less then 255 then Anyways thanks!
Quote from yoran765 :Thanks for the quick reply! Well i don't really have any programming knowledge but i guess i have to use less then 255 then Anyways thanks!

I would suggest probably under 239. The ID you're trying to set is the ClickID correct? The other values that it accepts are position which is 0-200 x and y.

It could be useful to look at the insim.txt file in you LFS/docs folder. It's more of a low-level view on how InSim works, but gives you guidance on what all of the parameters do and mean.
keep the ClickID under 210, lfs reserves the rest of the button id's after 210 dont work, at least in LFS external, i recommend you try out Insim.NET aswell its a much more reliable base & has all the latest updates and packets for InSim & a few other goodie's lfs_external doesnt have.

LsGO InSim UniqueID Help
(5 posts, started )
FGED GREDG RDFGDR GSFDG