GUILabel bug.

Started by NicusorN5, Jun 16, 2018, 06:26 PM

Previous topic - Next topic

NicusorN5

Description
    ::stats <- GUILabel(VectorScreen(10,sY- 30),Colour(255,255,255),"Not logged in");
::stats.FontSize = 20;
::stats.Color = Colour(255,0,0);

The third line of code shown here does not work, but the second and first do work for some strange reason.

Reproducible
Always (atleast my case)

What you were doing when the bug happened
Scripting and testing the client-side script I made.

What you think caused the bug
Bad table implementation?? I don't know for sure.

Stormeus

Should be stats.Colour

kennedyarz

Quote from: Athanatos(^_^) on Jun 16, 2018, 06:26 PMDescription
    ::stats <- GUILabel(VectorScreen(10,sY- 30),Colour(255,255,255),"Not logged in");
::stats.FontSize = 20;
::stats.Color = Colour(255,0,0);

The third line of code shown here does not work, but the second and first do work for some strange reason.

Reproducible
Always (atleast my case)

What you were doing when the bug happened
Scripting and testing the client-side script I made.

What you think caused the bug
Bad table implementation?? I don't know for sure.

       ::stats <- GUILabel(VectorScreen(10,sY- 30),Colour(255,255,255),"Not logged in");
        ::stats.FontSize = 20;
        ::stats.Colour = Colour(255,0,0);

Colour

NicusorN5

#3
Then why I get no errors in the debuglog.txt ?

[EDIT]
::stats.Colour = Colour(255,0,0);Still not doing anything. I did save the script file and restart the server. The GUILabel's color is still white.

.

Property TextColour / TextColor (bound)
Type: Colour

https://forum.vc-mp.org/?topic=2719.0
.

MEGAMIND

#5
Quote from: Athanatos(^_^) on Jun 17, 2018, 10:05 AMThen why I get no errors in the debuglog.txt ?

[EDIT]
::stats.Colour = Colour(255,0,0);Still not doing anything. I did save the script file and restart the server. The GUILabel's color is still white.

did u tried
::stats.Colour = Colour(0,255,0,0); // argb colors?
or try defining a color first like TextColor <- Colour( 0, 255, 255 );
Colour

    Constructor Colour(r, g, b, a)
        Parameter types: int, int, int, int

    Constructor Colour(r, g, b)
        Parameter types: int, int, int
        Alpha is set to 255.

    Constructor Colour(colour)
        Parameter types: Colour
        Creates a copy of the specified colour.

    Property R
        Type: int

    Property G
        Type: int

    Property B
        Type: int

    Property A
        Type: int

    Property Hex
        Type: int

https://wiki.vc-mp.org/wiki/Scripting/Squirrel/Client_Functions#Colour

NicusorN5