SA-MP Forums Archive
Mapping error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Mapping error (/showthread.php?tid=605715)



Mapping error - MonSterLikeHD - 23.04.2016

Hi, i am trying to add a color for a wall, but i don't know why i get this error, first, here is the script:

Quote:

new SupportWall100;
#define Green #{"1F5B16"}
SupportWall100 = CreateObject(19435, 1445.32605, -631.25519, 94.56500, 0.00000, 0.00000, 90.00000);
SetObjectMaterial(SupportWall100, 0, 19435, "all_walls", "wall6", Green);

And this is the error:

Quote:

C:\Users\Catalin\Desktop\SampForumHouse.pwn(40) : error 017: undefined symbol "Green"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.




Re: Mapping error - povargek - 23.04.2016

Try this:

Код:
#define greenColor 0xFF1F5B16
new SupportWall100;
SupportWall100 = CreateObject(19435, 1445.32605, -631.25519, 94.56500, 0.00000, 0.00000, 90.00000);
SetObjectMaterial(SupportWall100, 0, 19435, "all_walls", "wall6", greenColor);
Color need be is ARGB!


Re: Mapping error - MonSterLikeHD - 23.04.2016

Quote:
Originally Posted by povargek
Посмотреть сообщение
Try this:

Код:
#define greenColor 0xFF1F5B16
new SupportWall100;
SupportWall100 = CreateObject(19435, 1445.32605, -631.25519, 94.56500, 0.00000, 0.00000, 90.00000);
SetObjectMaterial(SupportWall100, 0, 19435, "all_walls", "wall6", greenColor);
Color need be is ARGB!
It is working, can you give me the site from where you takethe color?


Re: Mapping error - povargek - 23.04.2016

Quote:
Originally Posted by MonSterLikeHD
Посмотреть сообщение
It is working, can you give me the site from where you takethe color?
Type in ******: "rgb palette"

Color need be is 0xAARRBBGG

AA - transparency


Re: Mapping error - MonSterLikeHD - 23.04.2016

Quote:
Originally Posted by povargek
Посмотреть сообщение
Try this:

Код:
#define greenColor 0xFF1F5B16
new SupportWall100;
SupportWall100 = CreateObject(19435, 1445.32605, -631.25519, 94.56500, 0.00000, 0.00000, 90.00000);
SetObjectMaterial(SupportWall100, 0, 19435, "all_walls", "wall6", greenColor);
Color need be is ARGB!
But another problem, the wall didn't take the color, it's still white, why ?


Re: Mapping error - povargek - 23.04.2016

Quote:
Originally Posted by MonSterLikeHD
Посмотреть сообщение
But another problem, the wall didn't take the color, it's still white, why ?
I'm test this code on my server: