Blockland Forums > Modification Help
need help with %arg 1
Pew446:
--- Quote from: Honorable on August 05, 2010, 06:18:18 PM ---Oh! That almost fixed it. Just 1 problem. Syntax errors. or Error.
registerOutputEvent("gameConnection", "OpenGUI", "string 100 100");
function gameConnection::GUIOpener(%this, %arg1, %client)
{
if(%arg1 $= "")
{
return;
}
canvas.popdialog(%arg1);
}
--- End quote ---
Er.. Try this. I had it backwards.
Honorable:
no syntax errors. But no GUI pops up still. I use like honormining. (me and a friend made a gui name honormining) But yea wont pop up.
Headcrab Zombie:
Your event is named OpenGUI while the method is named GUIOpener
You're also trying to call a clientside function through the server.
Anytime anyone in the server triggers the event, it will open the GUI on the host's screen.
And finally, using both %this and %client in that function is redundant.
herb:
yes, u need to commandtoclient to open up the gui as headcrab said
Honorable:
--- Quote from: Headcrab Zombie on August 05, 2010, 06:37:49 PM ---Your event is named OpenGUI while the method is named GUIOpener
You're also trying to call a clientside function through the server.
Anytime anyone in the server triggers the event, it will open the GUI on the host's screen.
And finally, using both %this and %client in that function is redundant.
--- End quote ---
could you show me a example in scripting?
EDIT: Oh i see. Fixed! TY!