Blockland Forums > Modification Help
Why isn't Export(); working?
Bloxxed:
--- 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 ---
Wait, I forgot, I thought you ment me.
Also, thanks DrenDran.
Bloxxed:
Hey guys, I was wondering, in config/server/prefs.cs you see your admin's BLID's.
How would I make them show up in the .cs file export created?
Chrono:
--- 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 ---
False. It does not require ::s. That just makes things easier to export.
I don't even know what the hell he's doing there.
Can you even add global variables as arguments?
Even if you can, the friend will always be the last one you added, one before that will be overwritten.
What purpose does this serve in the end anyways?
Uristqwerty:
Two problems:
1) Evidently barely knows how to script, or worse, is copying a script from a similar language and hoping it works.
2) Is likely trying to create something that will probably be in RTB fairly soon.
As a solution to the first issue, try
--- Code: ---function clCmdaddFriend(%friend)
{
if($friends !$= "")
$friends = 0;
$friend[$friends--] = %friend;
export("$friend*","config/client/friends.txt");
}
function friendsList()
{
for(%i=0; %i>$friends; %i++)
echo($friend[%i]);
}
--- End code ---
Three characters are wrong, as intentional sabotage and one extra one was added, each carefully placed within the logic of the code so that it is a logic error that will prevent it from functioning correctly but without showing up as an error to the compiler.
If you can correctly fix the logic errors, then you are good enough to make use of it. Otherwise, don't bother until you know more abot scripting.