So, i am trying to draw some text on smart, but it won't seem to work for me.
This is the script i am using:
Simba Code:
program new;
//{$DEFINE SMART}
{$i SRL/SRL.simba}
{$i srl/srl/misc/paintsmart.simba}
{---SMART Setup consts---}
const
WORLD = 0;// Set a world, 0 = Random
MEMBERS = False;// Self-explationary
{---------------------------}
procedure DeclarePlayers;
begin
HowManyPlayers:= 1; // How many players will the script use
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0; // Which player to start at
Players[0].Name:=''; // Login
Players[0].Pass:=''; // Password?
Players[0].Nick:=''; // Some Chars from the nick (last characters)
Players[0].Active:= True; // Use this acc = true, otherwise False
Players[0].Pin := ''; // Blank if the player doesn't have a bank pin
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence']; // What rewards do you want from random event boxes? some letters from the name of the item
end;
procedure trys;
begin
SMART_DrawText(100, 400, UpCharsEx, 'Hello World!', clRed);
end;
Procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour: integer);
var
mx, my, Pic, Pic2, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx, my);
Pic := BitmapFromString(mx, my, '');
Pic2 := BitmapFromString(22, 19, 'meJytk7ENAjEMRVNSsgprsApr3A' +
'iU11KySsoraRnDZ/Glr499CS6wopPPsV9sx2ntn3K+3ny5cnlasJy' +
'WrUhwTzgDopYKhP50DpYKRMODvV4LSkAVUFgX9bks/Ss8Q9DbSjj0' +
'QHCFF5QzzwRClABIJYFDQsjqZwKBoJBDwlweb/Ol3chb9hEq1Hvv6' +
'pabqQRYTITh+LKE0Ez/hU/fbF1jRZr/aK5AgBtDdDUZp9E8MA0NvL' +
'+MreYrm8ykb+VLYdTo6Cx8zuGlj2QHxKVFOg==');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1,8388736);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
DrawBitmap(Pic2, Canvas, 40, 100);
FreeBitmap(Pic);
FreeBitmap(Pic2);
end;
////////////////////////////////////////////////////
////////////////////////////////////////////////////
////////////////////////////////////////////////////
////////////////////////////////////////////////////
{----Setups----}
procedure Setups;
begin
Smart_Server := WORLD;
Smart_Members := MEMBERS;
Smart_Signed := True;
SetupSRL;
DeclarePlayers;
if not loggedIn then
LogInPlayer;
end;
{--Setups end--}
{---MAINLOOP DOWN HERE---}
//////////////////////////
procedure MainLoop;
begin
trys;
end;
/////////////////////////
{----MAINLOOP ENDING----}
begin
Setups;
MainLoop;
end.
(All the mess is just remaining pieces of my default script)
And if it helps, here is the procedure in paintsmart.simba that messes up:
Simba Code:
procedure SMART_SetupDebug(); //for some reason it sometimes says it fucks up at this line, even though the error is with SmartSetDebug
begin
SmartSetDebug(True); //error seems to occur here
SMART_Canvas := TBitmap.Create;
SMART_Canvas.canvas.handle := SmartGetDebugDC;
SMART_DebugSetup := true;
end;
Thanks in advance 
EDIT:
Going to bed, then to work, so won't be back in some 16-20 hours.