PDA

View Full Version : SQL help! gang system


GameOvr
20/07/2018, 07:28 AM
I tried to use x337 gang system(http://forum.sa-mp.com/showthread.php?t=585851&page=1) but it gives me an error while compiling how to fix...

C:\Users\User\Downloads\New folder\x337\x337.pwn(1469) : error 010: invalid function or declaration
C:\Users\User\Downloads\New folder\x337\x337.pwn(1478) : error 010: invalid function or declaration
C:\Users\User\Downloads\New folder\x337\x337.pwn(1480) : error 010: invalid function or declaration
C:\Users\User\Downloads\New folder\x337\x337.pwn(1484) : error 010: invalid function or declaration
C:\Users\User\Downloads\New folder\x337\x337.pwn(1494) : error 010: invalid function or declaration
C:\Users\User\Downloads\New folder\x337\x337.pwn(1498) : error 010: invalid function or declaration
C:\Users\User\Downloads\New folder\x337\x337.pwn(1505) : error 010: invalid function or declaration
C:\Users\User\Downloads\New folder\x337\x337.pwn(1507) : error 010: invalid function or declaration
C:\Users\User\Downloads\New folder\x337\x337.pwn(1511) : error 010: invalid function or declaration
C:\Users\User\Downloads\New folder\x337\x337.pwn(1521) : error 010: invalid function or declaration
C:\Users\User\Downloads\New folder\x337\x337.pwn(1525) : error 010: invalid function or declaration
C:\Users\User\Downloads\New folder\x337\x337.pwn(1531) : error 010: invalid function or declaration
C:\Users\User\Downloads\New folder\x337\x337.pwn(1537) : error 010: invalid function or declaration
C:\Users\User\Downloads\New folder\x337\x337.pwn(1543) : error 010: invalid function or declaration
C:\Users\User\Downloads\New folder\x337\x337.pwn(1547) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


15 Errors.

what is wrong here..

-- phpMyAdmin SQL Dump
-- version 3.5.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 18, 2013 at 06:11 PM
-- Server version: 5.5.27-0ubuntu2
-- PHP Version: 5.4.6-1ubuntu1

-- --------------------------------------------------------

--
-- Table structure for table `rp_gang`
--

CREATE TABLE IF NOT EXISTS `rp_gang` (
`id` INT(10) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(30) NOT NULL,
`color` VARCHAR(6) NOT NULL,
`tag` VARCHAR(3) NOT NULL,
`score` INT(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------

--
-- Table structure for table `member`
--

CREATE TABLE IF NOT EXISTS `member` (
`id` int(10) NOT NULL,
`name` varchar(30) NOT NULL,
`status` int(1) NOT NULL DEFAULT '1',
`gang` int(10) NOT NULL DEFAULT '-1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `zone`
--

CREATE TABLE IF NOT EXISTS `zone` (
`id` int(10) NOT NULL,
`minx` varchar(10) NOT NULL,
`miny` varchar(10) NOT NULL,
`maxx` varchar(10) NOT NULL,
`maxy` varchar(10) NOT NULL,
`owner` int(10) NOT NULL DEFAULT '-1',
`name` varchar(50) NOT NULL DEFAULT 'Undefined Zone'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `gang`
--
ALTER TABLE `gang`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `member`
--
ALTER TABLE `member`
ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `name` (`name`);

--
-- Indexes for table `zone`
--
ALTER TABLE `zone`
ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `gang`
--
ALTER TABLE `gang`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `member`
--
ALTER TABLE `member`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `zone`
--
ALTER TABLE `zone`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
-- ------------------------------------------------


help plzz :p

iLearner
20/07/2018, 08:01 AM
Those are SQL statements, you have to execute them into MySQL (or phpmyadmin) to create required tables, delete them from the script.

GameOvr
20/07/2018, 08:08 AM
Those are SQL statements, you have to execute them into MySQL (or phpmyadmin) to create required tables, delete them from the script.

SOO IF i delete.. my data won't be save know????

iLearner
20/07/2018, 08:09 AM
You have to create a MySQL database, run those queries to create the tables and then connect to that database to save your gang stuff.

GTLS
20/07/2018, 01:52 PM
upload that .sql file to PHPMyAdmin. Search on ****** if you dont know how to upload a file to a database using phpmyadmin.

ManGoe
20/07/2018, 04:49 PM
All you need to do is 1.download XAMPP
2. Run Apacahe and MYSQL
3. Open http://localhost on browser
4. Login
5. Create a database
6. Upload the database
7. Define the sql connection at script.
8. Compile the script
9. Run it.
If you wanna know it very clearly read the X337's post?
http://forum.sa-mp.com/showthread.php?t=585851
Or whatever system your using.
Edit
- You must redefine database information on line 16-19
Code:
#define HOSTNAME ""
#define USERNAME ""
#define PASSWORD ""
#define DATABASENAME ""
Change to
#define HOSTNAME "localhost"
#define USERNAME "root"
#define PASSWORD ""
#define DATABASENAME "yourdatabase"