Every time i try to load the image i get this:
[IMG]http://i.gyazo.com/d845cd68bd303d3f37f26606836ba771.png[/IMG]
I cannot get the image to load for nothing.
[code] MainMenu = vgui.Create( "DFrame" )
MainMenu:SetPos( 192, 100 )
MainMenu:SetSize( 900, 600 )
MainMenu:SetTitle( "TrenTek User Module" )
MainMenu:SetBackgroundBlur( true )
MainMenu:SetVisible( true )
MainMenu:SetDraggable( true )
MainMenu:ShowCloseButton( true )
MainMenu:MakePopup()
PropertySheet = vgui.Create( "DPropertySheet")
PropertySheet:SetParent( MainMenu )
PropertySheet:SetPos( 5, 30 )
PropertySheet:SetSize( 890, 590 )
local TabOne = vgui.Create( "DPanel" )
TabOne:SetVisible( true )
PropertySheet:AddSheet( "Rules", TabOne, "icon16/shield.png",
false, false, "THe servers rules!" )
DermaImage = vgui.Create( "DImage", TabOne )
DermaImage:SetPos( 0, 0 )
DermaImage:SetImage( "ruless/sdf.vtf" ) -- this is the problem i am having.
DermaImage:SizeToContents() [/code]
I have been trying for an hour but can't get it to work. please help.
Location of files:
[IMG]http://i.gyazo.com/172e146094880fc655fe67f78a7ef978.png[/IMG]
Delete the .vtf extension in your SetImage line.
I seriously doubt your GMod installation is in C:/GMOD/
[del]Have you tried setting the image to the vmt instead of the vtf?
Where you have [lua]DermaImage:SetImage( "ruless/sdf.vtf" ) -- this is the problem i am having.[/lua] change it to vmt.[/del]
The wiki says you are right, I'm not sure...
[QUOTE=wh1t3rabbit;45279858]
The wiki says you are right, I'm not sure...[/QUOTE]
What? Where?
[QUOTE=Robotboy655;45279855]I seriously doubt your GMod installation is in C:/GMOD/[/QUOTE]
It could be a server.
[editline]3rd July 2014[/editline]
Or pirated.
[QUOTE=code_gs;45279871]It could be a server.[/QUOTE]
It still misses one folder up, unless the executable is on C:/ directly.
[QUOTE=code_gs;45279853]Delete the .vtf extension in your SetImage line.[/QUOTE]
That doesn't change anything.
[QUOTE=Robotboy655;45279855]I seriously doubt your GMod installation is in C:/GMOD/[/QUOTE]
It isn't. That is where my server is.
[QUOTE=Robotboy655;45279865]What? Where?[/QUOTE]
Well it doesn't explicitly say it, but the [URL="http://wiki.garrysmod.com/page/VGUI/Elements/DImage"]example here[/URL]
[QUOTE=wh1t3rabbit;45279896]Well it doesn't explicitly say it, but the [URL="http://wiki.garrysmod.com/page/VGUI/Elements/DImage"]example here[/URL][/QUOTE]
Fixed, thanks.
[QUOTE=McLovinLP;45279893]That doesn't change anything.
It isn't. That is where my server is.[/QUOTE]
Is the image on your client too?
[QUOTE=McLovinLP;45279893]That doesn't change anything.[/QUOTE]
Make sure you resource.AddFile it and that the file exists on FastDL if you use FastDL, etc.
[QUOTE=code_gs;45279909]Is the image on your client too?[/QUOTE] what do you mean?
[QUOTE=Robotboy655;45279915]Make sure you resource.AddFile it and that the file exists on FastDL if you use FastDL, etc.[/QUOTE]
I did that. Nothing changed.
[QUOTE=McLovinLP;45279961]what do you mean?[/QUOTE]
If you don't have the image files in your client installation of Garry's Mod (via hard copy, workshop, or fastdl), you won't be able to see it, regardless if it actually is working. That is why he is asking if you have the files on your client.
[QUOTE=Mista Tea;45279970]If you don't have the image files in your client installation of Garry's Mod, you won't be able to see it, regardless if it actually is working. That is why he is asking if you have the files on your client.[/QUOTE] They are there. He wasn't specific enough just saying client.
[QUOTE=McLovinLP;45279983]They are there. He wasn't specific enough just saying client.[/QUOTE]
There's only one thing client can refer to; GMod only has servers and clients.
Can you post what the .vtf looks like?
[QUOTE=code_gs;45279992]There's only one thing client can refer to; GMod only has servers and clients.
Can you post what the .vtf looks like?[/QUOTE]
i hope this is not the issue but here:
[IMG]http://i.gyazo.com/0c1c9ff9667c212ea7f99c80caa4ba3b.png[/IMG]
If you are sure that the image is in (downloads)/materials/ruless/ on both your client and server, and that you do not have .vtf in your SetImage line, and you have restarted the server since you made these changes, then I'm stumped.
Your vtf is not power of 2 texture, although it will be made power of 2 when you try to convert it to vtf, it may end up with worse quality then you expected.
Post image proof of your file being on your GMod CLIENT installation
Post console log after joining your server
Post serverside for resource.AddFile
Post clientside code for setImage
[QUOTE=Robotboy655;45280057]Your vtf is not power of 2 texture, although it will be made power of 2 when you try to convert it to vtf, it may end up with worse quality then you expected.
Post image proof of your file being on your GMod CLIENT installation
Post console log after joining your server
Post serverside for resource.AddFile
Post clientside code for setImage[/QUOTE]
[IMG]http://i.gyazo.com/e15fe492fa07c0c00224c891de129a12.png[/IMG]
[code]
Skeleton Gamemode
Map: gm_construct
Players: 1 / 20
Build: 5627
Server Number: 2
TrenTek Server
trentek
gm_construct
20
76561198067602639
Requesting 1 lua files from the server
ConVarRef mad_bulletspeed doesn't point to an existing ConVar
ConVarRef mad_damagemul doesn't point to an existing ConVar
ConVarRef mad_recoilmul doesn't point to an existing ConVar
ConVarRef gmod_physiterations doesn't point to an existing ConVar
PREP OK
clientside lua startup!
Lua JIT is DISABLED!
You are running ULib version 2.51.
[ULIB] Loading SHARED module: ulx_init.lua
[ULX] Loading CLIENT module: motdmenu.lua
[ULX] Loading CLIENT module: uteam.lua
[ULX] Loading CLIENT module: xgui_client.lua
[ULX] Loading CLIENT module: xgui_helpers.lua
[ULX] Loading CLIENT module: xlib.lua
[ULX] Loading SHARED module: chat.lua
[ULX] Loading SHARED module: fun.lua
[ULX] Loading SHARED module: mapvote.lua
[ULX] Loading SHARED module: menus.lua
[ULX] Loading SHARED module: rcon.lua
[ULX] Loading SHARED module: teleport.lua
[ULX] Loading SHARED module: user.lua
[ULX] Loading SHARED module: userhelp.lua
[ULX] Loading SHARED module: util.lua
[ULX] Loading SHARED module: vote.lua
--- Missing Vgui material HUD/killicons/equalizer
Client "McLovin" spawned in server (192.168.0.2:27006)<STEAM_0:1:53668455>.
ULX version 3.61 loaded.
Welcome to TrenTek Server! We're playing gm_construct.
[UTime]Welcome back McLovin, you last played on this server 07/03/14 03:14:38
///////////////////////////////////////
// ULX GUI -- Made by Stickly Man! //
///////////////////////////////////////
// Loading GUI Modules... //
// bans.lua //
// commands.lua //
// groups.lua //
// maps.lua //
// settings.lua //
// Loading Setting Modules... //
// client.lua //
// server.lua //
// Loading Gamemode Module(s)... //
// No module found! //
// Modules Loaded! //
///////////////////////////////////////
Compact freed 417792 bytes
Redownloading all lightmaps
You're playing on TrenTek Server, enjoy your stay! [/code]
you did mean this for console log right?
[IMG]http://i.gyazo.com/85004b0b499636d87007695563ee52e3.png[/IMG]
[IMG]http://gyazo.com/d538722dfdc367344c0036011bcd9507.png[/IMG]
Please tell me I am doing something wrong.
Show me the inside of your vmt file.
[QUOTE=KokoNum;45280171]Show me the inside of your vmt file.[/QUOTE] what do you mean the insider of it?
Can you post a clientside console log from your GMod console?
[editline]3rd July 2014[/editline]
Also, yeah, post your .vmt contents.
[QUOTE=McLovinLP;45280177]What? Why would I put this in my VMT file?[/QUOTE]
I want to validate the vmt make sure it's valid.
When you use SetImage you are directing it to the vmt file and not the vtf.
[QUOTE=code_gs;45280178]Can you post a clientside console log from your GMod console?
[editline]3rd July 2014[/editline]
Also, yeah, post your .vmt contents.[/QUOTE]
I showed the console above.
and
[code] "LightmappedGeneric"
{
"$basetexture" "Users/Laura/Desktop/sdf"
}
[/code]
That base texture is totally wrong. It should be ruless\sdf
[QUOTE=McLovinLP;45280193]I showed the console above.
and
[code] "LightmappedGeneric"
{
"$basetexture" "Users/Laura/Desktop/sdf"
}
[/code][/QUOTE]
Change it to
[code]
"UnlitGeneric"
{
"$basetexture" "ruless/sdf"
}
[/code]
[QUOTE=KokoNum;45280182]I want to validate the vmt make sure it's valid.
When you use SetImage you are directing it to the vmt file and not the vtf.[/QUOTE]
actually both of them are in their because i wasn't sure which one to put and a switched both of them out and they still dont work.
[QUOTE=McLovinLP;45280206]actually both of them are in their because i wasn't sure which one to put and a switched both of them out and they still dont work.[/QUOTE]
Both should be there the vmt is using the vtf as a texture.
[QUOTE=McLovinLP;45280206]actually both of them are in their because i wasn't sure which one to put and a switched both of them out and they still dont work.[/QUOTE]
You should be using both.
Sorry, you need to Log In to post a reply to this thread.