New to SAMP, Mysql Plugin
#1

Hey guys, frist thread i think. im giving Pawno scripting ago.

My error: J:\SAMP\gamemodes\new.pwn(56) : error 017: undefined symbol "connectDB"

Код:
connectDB()
{

mysql_connect("127.0.0.1", "root", "sa-mp", "ascent");

if(!mysql_ping())
{
	print("MYSQL: Connection is alive!");
	return 1;
}
else
{
	print("MYSQL: Connection is dead.");
	return 1;
}
return 1;
}

//My functions stop here..

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
connectDB();

}
Im trying to create a Function but for the life of me, i cant seem it get it running. Like i said im 100% new to this.

Sorry for my noobieness..

Thanks guys.
Reply
#2

What do you need exactly the plugin or what?
Reply
#3

You'll want to learn how to indent (use TAB). Anyways:

pawn Код:
stock connectDB()
{
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)