Jump to content
  • 0

[IMAGE]Not found


Sober

Question

def __setluckyslot(self, luckyimg):
		#vnum = str(luckyimg)
                #i tried replacing +luckyimg with +vnum too but no luck
		self.luckyimg.AppendImage("d:/icon/item/"+luckyimg)
		self.luckytxt.SetText("d:/icon/item/"+luckyimg)

I tried the above, in combination with

local i = "00010.tga"
cmdchat("showluckyslot")
cmdchat("setluckyslot "..i)
syschat("d:/icon/item/"..i)

i get the text normaly as i wished d:/ymir work/icon/item/00010.tga but the image is not shown!

I have the image in /icon/item/

 

log.txt

CResource::Load file not exist d:iconitem00010.tga

I think it has to do with variable types...

Any expert help? o.O

Link to comment
  • Answers 13
  • Created
  • Last Reply

Top Posters For This Question

13 answers to this question

Recommended Posts

  • 0
def __setluckyslot(self, luckyimg):
	self.luckyimg.AppendImage("d:/icon/item/%s.tga" % (luckyimg))
	self.luckytxt.SetText("d:/icon/item/%s.tga" % (luckyimg))

Lua:

local vnum = "00010"
cmdchat("setluckyslot "..vnum)

try this

Link to comment
  • 0
def __setluckyslot(self, luckyimg):
		#vnum = str(luckyimg)
                #i tried replacing +luckyimg with +vnum too but no luck
		self.luckyimg.AppendImage("d:/icon/item/"+luckyimg)
		self.luckytxt.SetText("d:/icon/item/"+luckyimg)

I tried the above, in combination with

local i = "00010.tga"
cmdchat("showluckyslot")
cmdchat("setluckyslot "..i)
syschat("d:/icon/item/"..i)

i get the text normaly as i wished d:/ymir work/icon/item/00010.tga but the image is not shown!

I have the image in /icon/item/

 

log.txt

CResource::Load file not exist d:iconitem00010.tga

I think it has to do with variable types...

Any expert help? o.O

 

 

 

Yours icon's path is wrong..

 

Just use

self.luckyimg.AppendImage("icon/item/"+luckyimg)

and remeber witch variable are you using

 

The element + can sum string with string and int with int.

 

Reguars Luzzo

 

Link to comment
  • 0
		luckyimg = ui.AniImageBox()
		luckyimg.AppendImage("icon/item/00010.tga")
		self.luckyimg = luckyimg
		self.luckyimg.SetPosition((wndMgr.GetScreenWidth()-1000)+43,50)

I think it has to do with this....

Link to comment
  • 0
		luckyimg = ui.AniImageBox()
		luckyimg.AppendImage("icon/item/00010.tga")
		self.luckyimg = luckyimg
		self.luckyimg.SetPosition((wndMgr.GetScreenWidth()-1000)+43,50)

I think it has to do with this....

 

 

yes are you sure that are the right x , y?

Link to comment
  • 0

I have another one question, and instead of opening a new thread i will ask here...

what is the property to place over other images for ui.AniImageBox ???

Link to comment
  • 0

Here u have all AniImageBox method

class AniImageBox(Window):
	def __init__(self, layer = "UI"):
		Window.__init__(self, layer)

	def __del__(self):
		Window.__del__(self)

	def RegisterWindow(self, layer):
		self.hWnd = wndMgr.RegisterAniImageBox(self, layer)

	def SetDelay(self, delay):
		wndMgr.SetDelay(self.hWnd, delay)

	def AppendImage(self, filename):
		wndMgr.AppendImage(self.hWnd, filename)

	def SetPercentage(self, curValue, maxValue):
		wndMgr.SetRenderingRect(self.hWnd, 0.0, 0.0, -1.0 + float(curValue) / float(maxValue), 0.0)

	def OnEndFrame(self):
		pass
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Read our Rules
  • Activity

    1. 0

      Help with quest

    2. 0

      Will anyone modify the mount?Mounts need to be mounted to increase their stats.

    3. 11

      Lock Picking Skill + Missions

    4. 4

      Quest Deleter

    5. 1

      [SOLUTION IN TOPIC]Loading locale_game.txt raises KeyError

    6. 1

      Binary functions: "GetSlotLocalPosition" & "GetSlotGlobalPosition"

    7. 1

      Binary functions: "GetSlotLocalPosition" & "GetSlotGlobalPosition"

    8. 1

      [SOLUTION IN TOPIC]Loading locale_game.txt raises KeyError

    9. 6

      Skill Book Combination System

  • Recently Browsing

    No registered users viewing this page.

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.