Vice City: Multiplayer

VC:MP Discussion => Bugs and Crashes => Support => Closed Bug Reports => Topic started by: NicusorN5 on Jun 16, 2018, 06:26 PM

Title: GUILabel bug.
Post by: NicusorN5 on Jun 16, 2018, 06:26 PM
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.
Title: Re: GUILabel bug.
Post by: Stormeus on Jun 16, 2018, 07:16 PM
Should be stats.Colour
Title: Re: GUILabel bug.
Post by: kennedyarz on Jun 16, 2018, 07:33 PM
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
Title: Re: GUILabel bug.
Post by: NicusorN5 on Jun 17, 2018, 10:05 AM
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.
Title: Re: GUILabel bug.
Post by: . on Jun 17, 2018, 10:24 AM
Property TextColour / TextColor (bound)
Type: Colour

https://forum.vc-mp.org/?topic=2719.0
Title: Re: GUILabel bug.
Post by: MEGAMIND on Jun 17, 2018, 10:40 AM
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
Title: Re: GUILabel bug.
Post by: NicusorN5 on Jun 17, 2018, 10:58 AM
Quote from: [Parked Account] on Jun 17, 2018, 10:24 AMProperty TextColour / TextColor (bound)
Type: Colour

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