SRL Archive - Help and Support

GetSymbolColorIn


lordsaturn

2008-11-12 00:00:44

When finding symbols, I get errors like these.


** Warning in GetSymbolColorIn: mining site is not a valid name.**
** Warning in GetSymbolColorIn: anvil is not a valid name.**

Though if you look in Symbol.scar you can clearly see that those are valid names.

'mining spot', 'mining site':
begin
SymbolBitmap := BitmapFromString(15, 5, 'z78DA95D03B0EC430' +
'0804D02B610C832931D9DCFF48894293C8DAD5464853F07905342' +
'91A67A46FF43BA31914AE602183A9E5686799A64E3C04BA4CFA43' +
'7E98439C770971257CB09F934B8E089F2FE43287A2F534166629A' +
'1121D03DB5BB94C0B1D9D811E2DEF66ED94BCF6BFC97753A33BF3' +
'7ABBCAEB9F0FD413672D');
Result := 4219541;
end;
'anvil':
begin
SymbolBitmap := BitmapFromString(15, 5, 'z78DA95CF510AC0300803D02B' +
'A59DE0F2D9F6FE771A2CFB10CAC4FE04117C443434D8E4C2EA4A8' +
'7DFCE8B06FB369AF38C025E139B5C7194EA106F73B9D2991C187D' +
'3773F92F2BE6A91CBFD05CE9FC00C9DB6164');
Result := 4012591;
end;

Anyone have any ideas about what's going wrong?

HyperSecret

2008-11-12 01:10:46

Post how you call the function.

Naum

2008-11-12 03:11:21

That happened with me aswell. I remove woodcutting.scar from it. Also another soution is to call:

LoadSymbolBitmap('symbol');

before the proc :)

Boreas

2008-11-15 23:03:23

SetupSRL

lordsaturn

2008-11-17 12:58:43

From: HyperSecret
Post how you call the function.



FindSymbols(TPA, 'mining spot');
FindSymbol(x, y, 'anvil');



From: NaumanAkhlaQ
That happened with me aswell. I remove woodcutting.scar from it. Also another soution is to call:

LoadSymbolBitmap('symbol');

before the proc :)


What do you mean, 'remove woodcutting.scar'?

From: Boreas
SetupSRL


Well duh i called SetupSRL, that's how i was able to use the function in the first place. :p

Boreas

2008-11-17 13:46:11

Weird. The only way I could reproduce your error is by not calling setupsrl. More specifically, setupsrl>loadsrlbitmaps>any of the bitmapfromstrings.

lordsaturn

2008-11-17 17:57:21

From: Boreas
Weird. The only way I could reproduce your error is by not calling setupsrl. More specifically, setupsrl>loadsrlbitmaps>any of the bitmapfromstrings.


Oh, so you have to load the bitmaps before you call them?

Edit:
@Boreas: http://www.villavu.com/forum/showthread.php?t=38294
What do you think?

Boreas

2008-11-18 19:39:18

The bitmaps in LoadSRLBitmaps aren't used in symbols, yet if you comment out all the bitmapfromstrings, you get the error, and if you uncomment one of them, the error goes away. I don't understand it, but that's just how I reproduced and fixed the error.

Posted on other thread:Looks pretty good, but it didn't get both of the doors in lumby chapel.