SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 26/03/2020, 05:28 PM   #1
Ukson
Little Clucker
 
Ukson's Avatar
 
Join Date: Jul 2015
Location: Serbian
Posts: 34
Reputation: 0
Post Faction System

I have a problem creating tables
https://pastebin.com/FBfiuwNZ
Faction system.
Ukson is offline   Reply With Quote
Old 26/03/2020, 06:10 PM   #2
Symon
Gangsta
 
Symon's Avatar
 
Join Date: Apr 2019
Location: Italy
Posts: 862
Reputation: 69
Default Re: Faction System

The error is clear:

Quote:
Table 'ugbase.organizacije' doesn't exist
Create the organizacije table.
__________________

Join The Server (play.symonscnr.com) | Discord | Website/Forum
Choose up from 5 different skills, Con Artist, Drug Dealer, Firefighter, Hitman and Terrorist.
Play as a Civilian or a LEO, bomb buildings/vehicles, rob shops or bank and many many more. Join us!
Symon is offline   Reply With Quote
Old 26/03/2020, 06:13 PM   #3
Ukson
Little Clucker
 
Ukson's Avatar
 
Join Date: Jul 2015
Location: Serbian
Posts: 34
Reputation: 0
Default Re: Faction System

I'm new to mysql a little bit of the thesis goes with creating tables and rows
Ukson is offline   Reply With Quote
Old 26/03/2020, 06:20 PM   #4
Symon
Gangsta
 
Symon's Avatar
 
Join Date: Apr 2019
Location: Italy
Posts: 862
Reputation: 69
Default Re: Faction System

Well you create that table the same way you created the rest for the faction system. Open PhpMyAdmin, select your database and create the table there.
__________________

Join The Server (play.symonscnr.com) | Discord | Website/Forum
Choose up from 5 different skills, Con Artist, Drug Dealer, Firefighter, Hitman and Terrorist.
Play as a Civilian or a LEO, bomb buildings/vehicles, rob shops or bank and many many more. Join us!
Symon is offline   Reply With Quote
Old 26/03/2020, 06:23 PM   #5
v1k1nG
Huge Clucker
 
v1k1nG's Avatar
 
Join Date: Feb 2018
Posts: 493
Reputation: 35
Default Re: Faction System

I think he needs to learn it from 0, it is not hard, you can do it
__________________
My test server: 51.91.122.18:7778
My Discord contact: [SF]kAn3#9933
v1k1nG is offline   Reply With Quote
Old 26/03/2020, 06:29 PM   #6
Ukson
Little Clucker
 
Ukson's Avatar
 
Join Date: Jul 2015
Location: Serbian
Posts: 34
Reputation: 0
Default Re: Faction System

I know in part. I don't know what I put in the base, but what it says in the enum
Ukson is offline   Reply With Quote
Old 26/03/2020, 06:37 PM   #7
Ukson
Little Clucker
 
Ukson's Avatar
 
Join Date: Jul 2015
Location: Serbian
Posts: 34
Reputation: 0
Default Re: Faction System

I know how to make table `organizacije` I don't know columns
Ukson is offline   Reply With Quote
Old 26/03/2020, 07:14 PM   #8
ShadowMortar
Huge Clucker
 
ShadowMortar's Avatar
 
Join Date: Jul 2016
Location: Croatia
Posts: 237
Reputation: 49
Default Re: Faction System

Run a simple query through phpmyadmin
PHP Code:
CREATE TABLE IF NOT EXISTS `organizacije`( `IDINT(10NOT NULL UNIQUE, `tipINT(10NOT NULL, `intINT(10), `rank1VARCHAR(40NOT NULL, `rank2VARCHAR(40NOT NULL
                                           `
rank3VARCHAR(40NOT NULL, `rank4VARCHAR(40NOT NULL, `rank5VARCHAR(40NOT NULL, `rank6VARCHAR(40NOT NULL
                                           `
rank7VARCHAR(40NOT NULL, `liderVARCHAR(40NOT NULL, `skrVARCHAR(40NOT NULL ); 
Or simply run it through script (OnGameModeInit)
PHP Code:
mysql_tqueryyourdatabase"CREATE TABLE IF NOT EXISTS `organizacije`( `ID` INT(10) NOT NULL UNIQUE, `tip` INT(10) NOT NULL, `int` INT(10), `rank1` VARCHAR(40) NOT NULL, `rank2` VARCHAR(40) NOT NULL, \
                                           `rank3` VARCHAR(40) NOT NULL, `rank4` VARCHAR(40) NOT NULL, `rank5` VARCHAR(40) NOT NULL, `rank6` VARCHAR(40) NOT NULL, \
                                           `rank7` VARCHAR(40) NOT NULL, `lider` VARCHAR(40) NOT NULL, `skr` VARCHAR(40) NOT NULL );" 
); 
WARNING: If you are going to run the query through the script you must run it after the database connection was successfully established!
__________________
Quote:
Originally Posted by CheezIt View Post
Follow your heart and own style.
Feel free to PM me if you need help.
Quote:
Originally Posted by Pottus View Post
That is perfectly fine, I'm just pointing out where you made mistakes what does hearing "good job" get you? Absolutely nothing. You need to hear the problems otherwise you'll keep making the same mistakes
ShadowMortar is offline   Reply With Quote
Old 26/03/2020, 07:35 PM   #9
Ukson
Little Clucker
 
Ukson's Avatar
 
Join Date: Jul 2015
Location: Serbian
Posts: 34
Reputation: 0
Default Re: Faction System

Thank you very much I want to learn mysql
Ukson is offline   Reply With Quote
Old 26/03/2020, 07:41 PM   #10
Ukson
Little Clucker
 
Ukson's Avatar
 
Join Date: Jul 2015
Location: Serbian
Posts: 34
Reputation: 0
Default Re: Faction System

I want to learn when INT goes, VARCHAR...
Ukson is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Making faction system more than 1 faction Zeus666 Scripting Help 9 16/04/2018 10:10 AM
[FilterScript] [Request]Dynaimc Faction System and Crates System Doros Filterscripts 6 05/11/2017 05:48 PM
Faction System Jigsaw123 Scripting Help 3 26/09/2014 07:55 PM
Help with faction system Michael_Cuellar Scripting Help 3 12/04/2013 01:25 AM
Faction System ruben2812 Help Archive 1 29/05/2010 11:45 AM


All times are GMT. The time now is 03:09 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.