Help Crashed when deleting a GUI button

Started by Luis_Labarca, Oct 12, 2016, 12:32 AM

Previous topic - Next topic

Luis_Labarca


good I want to make a button to give you click to clear and longer nose and do it whenever I do it gives me a message with an error the erro is[20:21:46] Crashed with address 101C7594. Log created to crashlogs folder.
This is an example of what I want to do
Test <- null;
function Script::ScriptLoad()
{
::Test <- GUIButton(VectorScreen(300,100), VectorScreen(50, 22), Colour(75,75,75), "Test", GUI_FLAG_BORDER | GUI_FLAG_VISIBLE);
::Test.TextColour = Colour(255, 255, 255);
::Test.FontName = Colour(75,75,75);
::Test.FontSize = 8;
::Test.Alpha=180;
}
function GUI::ElementClick(element, mouseX, mouseY)
{
if (element == Test)
{
::Test<-null;//Delete
}
}
help and thanks :)
My server RP
IP: 51.222.28.159:8194

DizzasTeR

Happens with me too, thought it was just me... would hope to get a feedback on this one

Luis_Labarca

#2
Quote from: Doom_Kill3R on Oct 12, 2016, 04:44 AMHappens with me too, thought it was just me... would hope to get a feedback on this one
Bro's this form if removes the button without problems :D
///Script-Server

function onClientScriptData(player)
{
local ReadStri = Stream.ReadString();

if(ReadStri=="DeletTest")
{
Stream.StartWrite()
Stream.WriteString("DeletTestSide")
Stream.SendStream(player)
Stream.StartWrite()
}
}

///Client-Side
Test <- null;
function Script::ScriptLoad()
{
::GUI.SetMouseEnabled(true);
::Test <- GUIButton(VectorScreen(300,100), VectorScreen(50, 22), Colour(75,75,75), "Test", GUI_FLAG_BORDER | GUI_FLAG_VISIBLE);
::Test.TextColour = Colour(255, 255, 255);
::Test.FontName = Colour(75,75,75);
::Test.FontSize = 8;
::Test.Alpha=180;
}
function GUI::ElementClick(element, mouseX, mouseY)
{
if (element == Test)
{
local D = Stream();
D.WriteString("DeletTest");
Server.SendData(D);
}
}
function Server::ServerData(stream)
{
local ReadStri = stream.ReadString();
if(ReadStri=="DeletTestSide")
{
::Test<-null;//Delete
}
}
My server RP
IP: 51.222.28.159:8194

KAKAN

Test <- null;
function Script::ScriptLoad()
{
::Test <- GUIButton(VectorScreen(300,100), VectorScreen(50, 22), Colour(75,75,75), "Test", GUI_FLAG_BORDER | GUI_FLAG_VISIBLE);
::Test.TextColour = Colour(255, 255, 255);
::Test.FontName = Colour(75,75,75);
::Test.FontSize = 8;
::Test.Alpha=180;
}
function GUI::ElementClick(element, mouseX, mouseY)
{
if (element == Test)
{
::DoSomethingElse();
}
}
function DoSomethingElse(){ return Test <- null; }
try that.
oh no