Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

string integer related error

Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
06-26-2008 16:07
no matter what i do i cant seam to get this to work i think i must be doing something stupid again, when you press up/dwn it changes the integers for a throttle everything works fine till i try to send it to my hud here is the problem

CODE

{
float thrustPercent = (((float)fwd/(float)maxThrottle) * 100);
llMessageLinked(LINK_ALL_CHILDREN,(string)((integer)thrustPercent)),"throttle",""); // at the end of the string integer trust part
}
Syntax Error



but yet it works when i do ownersay >.>
anyone have any ideas is it posible num cant go to 100?
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
06-26-2008 16:25
CODE

{
float thrustPercent = (((float)fwd/(float)maxThrottle) * 100);
llMessageLinked(LINK_ALL_CHILDREN,(integer)thrustPercent,"throttle","");
}

I changed second parameter for 'llMessageLinked' to an integer because an integer is expected
Happy scripting
_____________________
From Studio Dora
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
06-26-2008 16:28
knew it had to be a dumb mistake :P
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
06-26-2008 17:49
no mistake is dumb after the first 10 seconds of debugging , after that its a huge deal!

trust me on that one