Blockland Forums > Modification Help

**Reading** Text Files Using Functions

Pages: << < (2/2)

Aloshi:

That explains why my files had that...thanks.

Flea:

Neither worked, but i made a gui i just need the slash command to show it.

Like:
/ShowGui
(Gui Pops Up)

Nothing special you see.

Oh and whats %i I see it alot in code, but i dont know what it is or what its for.

Thanks for eveyones help so far.

Space Guy:


--- Quote from: Space Guy on June 02, 2007, 02:15:35 PM ---As far as I know, the GUI is broken and will not work for anyone but the host.

If you are trying to set the text on a GUI remotely:

Add-Ons/Client/GUIHello_client.cs

--- Code: ---function clientcmdGUIset(%obj,%text)
{
 %obj.setText(%text);
}

function clientcmdopenGUI(%obj,%gui)
{
 canvas.pushDialog(%gui);
}

function guiHello::onWake(%this)
{
 commandtoserver('updateHelloGUI');
}
--- End code ---

Add-Ons/Hello.cs

--- Code: ---function servercmdShowGUI(%client)
{
 commandtoclient(%client,'openGUI',"guiHello");
 commandtoclient(%client,'GUIset',txtHello,"Hello " @ %client.name);
}
--- End code ---

... Where guiHello is created by you with one control, "txtHello" as a MLTextCtrl.

--- End quote ---

Anyone who has both files and the "guiHello" GUI added can type /showGUI on your server, have it pop up and have info sent to it i.e. "Hello Space Guy" would appear using the code above if I typed /showGUI.

Flea:

So what your saying is i'd have to have a gui to see it if i was on someone elses server?

Space Guy:

Yes. Ephialtes was working on a 'safe' GUI downloader (not code, just sending "BUTTON x y width height" etc) but it seems to have dissapeared. It would be helpful to have. Maybe I could add something like that with a "Do you want to download GUI: RPGLoginGUI?" message, etc.

Pages: << < (2/2)

Go to full version