Hello There, Guest! Login or Register


public doesn't work
#8
(04-24-2008, 12:00 AM)Motorola link Wrote: xanland, you r way too more inteligent than us, i think you wont get help asking here  _O- _O-

Don't be too hasty to assume ;)

Code:
set_mysql_loggedin_level(prname, level)
{
       new giveplayerid[MAX_PLAYER_NAME];
    new prname[MAX_PLAYER_NAME];
    GetPlayerName(giveplayerid,prname,sizeof(prname));
    format(strlogin, sizeof(strlogin), "UPDATE users SET loggedin='%d' WHERE name = '%s'", level,prname);
    samp_mysql_query(strlogin);
    samp_mysql_store_result();
}

Look at the variable declarations.
Your two variables are arrays.
The error "argument type mismatch" means that a function is not being passed the correct type of variable.
The variable "giveplayerid" should be an integer, not an array. The function GetPlayerName() will need to use an integer variable to check whose player's name to get.

Oh, by the way, don't use the script showroom for help threads. Those should go in the scripting section.
Reply


Messages In This Thread
public doesn't work - by Xanland - 04-22-2008, 06:15 PM
Re: public doesn't work - by FarePak - 04-22-2008, 09:30 PM
Re: public doesn't work - by InVion - 04-22-2008, 09:33 PM
Re: public doesn't work - by Fry - 04-22-2008, 09:49 PM
Re: public doesn't work - by HaZe - 04-22-2008, 10:00 PM
Re: public doesn't work - by Xanland - 04-23-2008, 05:39 PM
Re: public doesn't work - by Motorola - 04-24-2008, 12:00 AM
Re: public doesn't work - by Fry - 04-24-2008, 12:24 AM
Re: public doesn't work - by Motorola - 04-24-2008, 12:28 AM
Re: public doesn't work - by Fry - 04-24-2008, 12:29 AM
Re: public doesn't work - by Motorola - 04-24-2008, 01:07 AM
Re: public doesn't work - by Jay - 04-24-2008, 12:06 PM
Re: public doesn't work - by Badeend - 04-24-2008, 12:40 PM
Re: public doesn't work - by Smoke - 04-24-2008, 12:43 PM
Re: public doesn't work - by Jay - 04-24-2008, 01:08 PM
Re: public doesn't work - by Xanland - 04-24-2008, 04:42 PM
Re: public doesn't work - by Smoke - 04-25-2008, 05:07 AM