RPTools.net

Discussion and Support

Skip to content

It is currently Mon Dec 18, 2017 3:29 pm 




Forum rules


PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)



Reply to topic  [ 8 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3782
Location: MD
 Post subject: No image in table error.
PostPosted: Mon Oct 30, 2017 7:02 pm 
When attempting to pull an image from a table entry that has no image I'm getting this error:

Code:
No Image available in function "tblImage" for table "Table Name".


Do I have to insert images into every table row to avoid this?

Since I'm pulling item data from a table that doesn't have an image for every item I'd rather see an X, or a question mark, or nothing at all when there is no available image.

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7969
Location: Bay Area
 Post subject: Re: No image in table error.
PostPosted: Mon Oct 30, 2017 7:21 pm 
You can store which indexes have/don't have images in them and check that first. I would store that info in index 0 of table.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3782
Location: MD
 Post subject: Re: No image in table error.
PostPosted: Mon Oct 30, 2017 8:44 pm 
aliasmask wrote:
You can store which indexes have/don't have images in them and check that first. I would store that info in index 0 of table.

Yeah... some of my tables are quite large though and adding the 0 index after the table is already built stick it down at the end of the table... so I guess I can create a macro to make a temp table to add them in order... delete current table and then rename the temp back to the original...

The items are a string list with 50 fields... so I could add another field for whether or not it has an image, but I was hoping there was some less clunky way to do it.

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7969
Location: Bay Area
 Post subject: Re: No image in table error.
PostPosted: Tue Oct 31, 2017 1:03 am 
It doesn't matter where index 0 is in the table (I think), but you can rewrite the table with macros now without having to do it manually. You just have to do each table index first before rewriting it so you know what gets copied over. So, if you have a table with 50 entries and 10 have not images just put those indexes in an array first then have the macro do all the heavy lifting.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3782
Location: MD
 Post subject: Re: No image in table error.
PostPosted: Tue Oct 31, 2017 1:20 am 
aliasmask wrote:
It doesn't matter where index 0 is in the table (I think)

It doesn't... I just don't like the way it looks when I add things and they're visually out of order. I often leave blanks to try and keep things grouped accordingly... but that doesn't always hold up... so making a table re-sort macro won't be a total waste of time.

I was just hoping that there was some simple trick to code in an "if table item doesn't have an image then use no image or use this image". I guess there isn't.

I think I'll just end up adding some generic <4k image to every entry.

Quote:
but you can rewrite the table with macros now without having to do it manually

The newer table macros have made using tables as a database (instead of tokens as I have in the past) something I really rely on these days. I just wish there wasn't some of these little issues to work around.

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3782
Location: MD
 Post subject: Re: No image in table error.
PostPosted: Tue Oct 31, 2017 1:59 am 
Full Bleed wrote:
I think I'll just end up adding some generic <4k image to every entry.

Well... that didn't work.

You can't add an image to a table with a macro using setTableEntry. There is no image parameter. So I tried using addTableEntry and I ended up with double of all of my entries. That seems like a bug.

And you can't pull an image asset from another table using tableImage either... it produces a question mark.

So there doesn't appear to be a way to mass add an image asset to table entries.

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7969
Location: Bay Area
 Post subject: Re: No image in table error.
PostPosted: Tue Oct 31, 2017 2:09 am 
It does work, but I think there was a non-intuitive reason for it not working. It's on another thread, I'll do a search.

edit: Yeah, here it is: viewtopic.php?f=86&t=27052#p265691

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3782
Location: MD
 Post subject: Re: No image in table error.
PostPosted: Tue Oct 31, 2017 3:14 am 
aliasmask wrote:
edit: Yeah, here it is: viewtopic.php?f=86&t=27052#p265691

Thanks. I'd gotten everything to work but the asset retrieval.

But it seems like there are two bugs to work around though:

1) addTableEntry doesn't overwrite an entry. Fix: Delete entry and then add.
2) The image ID parameter adds the redundant "asset://" prefix. Fix: substring out the prefix.

EDIT: #2 above will BREAK macros when the bug is fixed.

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 8 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 2 guests





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman