Blockland Forums > Modification Help
Why isn't Export(); working?
Bloxxed:
I'm trying to make a friend system, I'm saying /friend namehere and it says Friend added etc, but whenever I load up the game again and say /friendlist again it won't echo back my friends.
Script:
--- Code: ---function clCmdaddFriend($friend1)
{
echo("Added friend " @ $friend1);
export("$friend1*","config/client/friends.txt"); //Problem is here, it won't create the .txt file, why?
}
function friendsList($friend1)
{
echo("Friends: " @ $friend1);
}
--- End code ---
(ClCmd is Truce's Client Cmd)
DrenDran:
--- Quote from: Bloxxed on October 17, 2010, 10:52:17 AM ---I'm trying to make a friend system, I'm saying /friend namehere and it says Friend added etc, but whenever I load up the game again and say /friendlist again it won't echo back my friends.
Script:
--- Code: ---function clCmdaddFriend($friend1)
{
echo("Added friend " @ $friend1);
export("$friend1*","config/client/friends.txt"); //Problem is here, it won't create the .txt file, why?
}
function friendsList($friend1)
{
echo("Friends: " @ $friend1);
}
--- End code ---
(ClCmd is Truce's Client Cmd)
--- End quote ---
I think it needs to have a :: system in the variable, like here:
export("$SSDD::prefs*",$SSDD::static::prefpath);
Bloxxed:
How do I make one, then?
Ephialtes:
--- Quote from: DrenDran on October 17, 2010, 11:19:39 AM ---I think it needs to have a :: system in the variable, like here:
export("$SSDD::prefs*",$SSDD::static::prefpath);
--- End quote ---
No. The problem here is this guy doesn't know how to script.
DrenDran:
--- Quote from: Bloxxed on October 17, 2010, 11:20:23 AM ---How do I make one, then?
--- End quote ---
$rp::health::animals::cats = 100;
export("$rp::health*","prefs.cs");
Also it should end in .cs not .txt
EDIT:
--- Quote from: Ephialtes on October 17, 2010, 11:21:09 AM ---No. The problem here is this guy doesn't know how to script.
--- End quote ---
You replied while I was typing this reply, I didn't see that until after this reply.