Author Topic: Questions  (Read 4743 times)

if(%name != "")

"" is not a number, it's an empty string.

!$=

Well, you're going to need some basic knowledge of dump(), and it's ability. Find the "Function" that you need, in this case you would need to find the function relating to OnProjectileHit, OnDamageTake or whatever the name is. Using the Dump function you can find out all of the information passable through the function Dump is used upon. Doing so will allow you to use the function do set the "Rep" of a player.
How do I use dump?

Any SimObject has dump()
Well, that means, any object has dump()

findclientbyname("kal").dump();
findclientbyname("kal").player.dump();

Code: [Select]
function Levelup(%client)
{
if((%client.HeedRP["EXP"]) >= %client.HeedRP["EXPreq"])
{
echo("lol");
}
}
Not echoing. I made sure my EXP is high enough

Try to debug on your own.

Code: [Select]
function LevelUp(%client)
{
if(%client.HeedRP["Exp"] >= %client.HeedRP["ExpReq"])
{
echo("Lol");
}
}

Heedicalking, are you even checking for syntax errors before complaining to us?

Heedicalking, are you even checking for syntax errors before complaining to us?
Exactly what I thought, and if he replies with "What is a syntax error" I'm refusing to help him.

Heedicalking, are you even checking for syntax errors before complaining to us?
it gave no errors for me in console.

it gave no errors for me in console.
Stop complaining to us
echo("Exp: "@ %client.HeedRP["Exp"]);
echo("ExpReq: "@ %client.HeedRP["ExpReq"]);

« Last Edit: December 12, 2009, 08:08:47 PM by Desolation »


No.
Yes.

He closed the if after "["EXP]".

if((%client.HeedRP["EXP"]) >= %client.HeedRP["EXPreq"])


do variables transfer through different zips?
Like if I assign a variable in the folder
add-ons/A_RP/RPStats.cs
will variables I put there like
Code: [Select]
%this.ammo["Bow"] = 15;could I call it back in
add-ons/weapon_bow/weapon_bow.cs
Code: [Select]
if(%this.ammo["Bow"] > 0)

If you are asigning a variable under an object it will stay until the server ends.
Globals - $Variables Stay until changed or until the server ends
and %Variables Stay until it reachs the end of the function.

So if I assign a variable to a player could I call that variable in another script?