MYSQL,stating with errors :/
#1

so i readed around 10000 tutorials about mysql and how to use,and i'm trying to create a database,and save just money,and started with errors.. :/
so i have wamp server,and i get errors when i go to phpmyadmin (localhost),look:

and some of my errors,for no reason !!:
Код:
#include <a_mysql>

#define mysql_host "127.0.0.1"
#define mysql_user "root"
#define mysql_password ""
#define mysql_database "server"

public OnPlayerDisconnect(playerid,reason)
{
    new score = GetPlayerScore(playerid),money = GetPlayerMoney(playerid),query[300], pname[24];
    GetPlayerName(playerid, pname, 24);
    format(query, sizeof(query), "UPDATE `playerdata` SET `score` = '%d', `money` = '%d' WHERE `user` ='%s'", score, money, pname);
	mysql_query(query); // 30
	return 1;
}

public OnGameModeInit()
{
    mysql_debug(1);//66
	mysql_connect(mysql_host,mysql_user,mysql_database,mysql_password);
	mysql_query("CREATE TABLE IF NOT EXISTS playerdata(user VARCHAR(24), password VARCHAR(41), score INT(20), money INT(20))"); // 68
	return 1;
}
public OnGameModeExit()
{
	mysql_close();
	return 1;
}
just this and look at errors:
(30) : error 035: argument type mismatch (argument 1)
(66) : warning 206: redundant test: constant expression is non-zero
(66) : warning 215: expression has no effect
(6 : error 035: argument type mismatch (argument 1)

yup my first try with mysql
coding is easy,but about PHP and idk
thanks for reading , i wish u answer
Reply
#2

show the line errors!
Reply
#3

Hey, and wtf I think this is not from your script of samp it is from the web server, you don't have PHP my admin
Reply
#4

@bomber07 i wrote lines after // •_•
Also @bgedition yeah i need solution please ,i have wamp server,with mysql console and phpmyadmin and local host,but i got this error on phpmyadmin,i haven't touch anything before
Reply
#5

Try to reinstall your wamp or uninstall this and install xampp if wamp does not work.
Reply
#6

Quote:
Originally Posted by Roberto80
Посмотреть сообщение
so i have wamp server
No, you don't. The error page clearly says IIS (Internet Information Services) which is a webserver from Microsoft. The A in WAMP server stands for Apache, a webserver by the Apache Foundation. Go to Add or Remove Windows Features in the control panel and disable IIS.

Reply
#7

Quote:
Originally Posted by Vince
Посмотреть сообщение
No, you don't. The error page clearly says IIS (Internet Information Services) which is a webserver from Microsoft. The A in WAMP server stands for Apache, a webserver by the Apache Foundation. Go to Add or Remove Windows Features in the control panel and disable IIS.

Thanks mister the pro
I disabled it and restarting my laptop and i will try again and edit this post
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)