Author Topic: Barber  (Read 2432 times)

Thank you for making this, Quartz.

I found and fixed some errors.


"$Pref::Barber::SaveFile" fails to update through BLglass.
   invalid string length
      RTB_registerPref("Save File","Barber | Settings","$Pref::Barber::SaveFile","string","Server_Barber", "savedhairdos.cs",   false, true, "");
         should be
      RTB_registerPref("Save File","Barber | Settings","$Pref::Barber::SaveFile","string 100","Server_Barber", "savedhairdos.cs",   false, true, "");


Fonts not working:
$Pref::Barber::Font is not set upon initiation.
$Pref::Barber::Prefix is not set upon initiation.

The following two values are set and not used:
$Barber::Prefix = "Barber_Hair";
$Barber::Font = "Impact";

I imagine you changed from $Barber::* to $Pref::Barber* midway through, and didn't update haircut.cs appropriately.
To avoid this in the future, I suggest final testing all mods on a clean installation of Blockland.


Something else I noticed while integrating this with my gamemode:
Code: (haircut.cs) [Select]
%player.setMaxBackwardSpeed($Barber::Speed[%client].BackwardSpeed);
%player.setMaxCrouchBackwardSpeed($Barber::Speed[%client].CrouchBackwardSpeed);
%player.setMaxCrouchForwardSpeed($Barber::Speed[%client].CrouchForwardSpeed);
%player.setMaxCrouchSideSpeed($Barber::Speed[%client].CrouchSideSpeed);
%player.setMaxForwardSpeed($Barber::Speed[%client].ForwardSpeed);
%player.setMaxSideSpeed($Barber::Speed[%client].SideSpeed);
Storing those speed variables in a global variable like that is going to leave some junk in memory.
That data could be stored on the player.  Something like "%player.barberbackwardspeed".
In that way the temporary data is cleaned up when the player is killed or deleted.

Thank you for making this, Quartz.

I found and fixed some errors.


"$Pref::Barber::SaveFile" fails to update through BLglass.
   invalid string length
      RTB_registerPref("Save File","Barber | Settings","$Pref::Barber::SaveFile","string","Server_Barber", "savedhairdos.cs",   false, true, "");
         should be
      RTB_registerPref("Save File","Barber | Settings","$Pref::Barber::SaveFile","string 100","Server_Barber", "savedhairdos.cs",   false, true, "");


Fonts not working:
$Pref::Barber::Font is not set upon initiation.
$Pref::Barber::Prefix is not set upon initiation.

The following two values are set and not used:
$Barber::Prefix = "Barber_Hair";
$Barber::Font = "Impact";

I imagine you changed from $Barber::* to $Pref::Barber* midway through, and didn't update haircut.cs appropriately.
To avoid this in the future, I suggest final testing all mods on a clean installation of Blockland.


Something else I noticed while integrating this with my gamemode:
Code: (haircut.cs) [Select]
%player.setMaxBackwardSpeed($Barber::Speed[%client].BackwardSpeed);
%player.setMaxCrouchBackwardSpeed($Barber::Speed[%client].CrouchBackwardSpeed);
%player.setMaxCrouchForwardSpeed($Barber::Speed[%client].CrouchForwardSpeed);
%player.setMaxCrouchSideSpeed($Barber::Speed[%client].CrouchSideSpeed);
%player.setMaxForwardSpeed($Barber::Speed[%client].ForwardSpeed);
%player.setMaxSideSpeed($Barber::Speed[%client].SideSpeed);
Storing those speed variables in a global variable like that is going to leave some junk in memory.
That data could be stored on the player.  Something like "%player.barberbackwardspeed".
In that way the temporary data is cleaned up when the player is killed or deleted.
Thank you, you're kind.

I'll look into this.