• various things not working on dedicated server
    5 replies, posted
Hi all. I'm bashing my head against the wall wondering why these things are happening... Firstly, nothing happens when I spin the scrollwheel - the IsMouseDown check never returns true. I've tried swapping the plain text enums for their number value (112 and 113) [CODE] local dist = 100 --third person function ThirdPerson( ply, pos, ang, fov ) if input.IsMouseDown(MOUSE_WHEEL_DOWN) then if dist > 50 then dist = dist - 5 end elseif input.IsMouseDown(MOUSE_WHEEL_UP) then if dist < 1000 then dist = dist + 5 end end print(dist) -- this does not change from 100 end hook.Add( "CalcView", "ThirdPerson", ThirdPerson ) [/CODE] Another issue I'm having is that code that worked on a listen server is breaking on a dedicated. Suddenly the bottom borders of my DTextEntry boxes are not drawing. It's not a case of them not fitting the DPanel correctly or being covered up, see second screenshot See [URL]http://i.imgur.com/rc9ALLc.png[/URL] and [URL]http://i.imgur.com/P9RdFCf.png[/URL] And sql.SQLStr is still adding a bunch of random double quotation marks into strings, which it doesn't do on a listen server Thanks for any help :)
Use CreateMove for mouse-wheel: -1, 0, 1 [lua]hook.Add( "CreateMove", "ThirdpersonFreecam:CreateMove", function( cmd ) print( cmd:GetMouseWheel( ) ); end );[/lua]
[QUOTE=Acecool;44326218]Use CreateMove for mouse-wheel: -1, 0, 1 [lua]hook.Add( "CreateMove", "ThirdpersonFreecam:CreateMove", function( cmd ) print( cmd:GetMouseWheel( ) ); end );[/lua][/QUOTE] Thanks! That works. Can you offer any insight into the other problems?
Code is executed differently when in singleplayer vs mp. Use SRCDS to test your code. Second, sql.SQLStr takes a second argument for putting ""s around strings. Set it to true/false depending what you want to do.
[QUOTE=Acecool;44327691]Code is executed differently when in singleplayer vs mp. Use SRCDS to test your code. Second, sql.SQLStr takes a second argument for putting ""s around strings. Set it to true/false depending what you want to do.[/QUOTE] I'm aware there's differences... it's fixing the problems I'm stuck on. I've already set SQLStr's second argument to true, to disable adding " but it still ruins the string, as I've posted here [url]http://facepunch.com/showthread.php?t=1348923&p=44319465&viewfull=1#post44319465[/url] My other issue is that disabled DTextEntry boxes aren't drawing properly (enabled ones are fine). They're 'moved downwards' by 1 pixel, thus making them draw wrong - but this only happens on a dedicated server thanks :)
Hmm it seems I can type into the disabled text entrys as well
Sorry, you need to Log In to post a reply to this thread.