SA-MP Forums Archive
SQLite help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SQLite help (/showthread.php?tid=263902)



SQLite help - PCheriyan007 - 23.06.2011

FIXED thanks to Larsey123


Re: SQLite help - =WoR=Varth - 24.06.2011

pawn Код:
db_free_result(db_query(Database,"CREATE TABLE IF NOT EXISTS `A` (`1`,`2`,`3`)"));



Re: SQLite help - PCheriyan007 - 24.06.2011

Okay, now that problem is solved. Now I am getting other errors.
Код:
C:\Users\Preston\Desktop\SA-MP Servers\Lsrcr\filterscripts\SQLite.pwn(82) : error 075: input line too long (after substitutions)
C:\Users\Preston\Desktop\SA-MP Servers\Lsrcr\filterscripts\SQLite.pwn(83) : error 037: invalid string (possibly non-terminated string)
C:\Users\Preston\Desktop\SA-MP Servers\Lsrcr\filterscripts\SQLite.pwn(83) : error 017: undefined symbol "CREATE"
C:\Users\Preston\Desktop\SA-MP Servers\Lsrcr\filterscripts\SQLite.pwn(83) : error 017: undefined symbol "TABLE"
C:\Users\Preston\Desktop\SA-MP Servers\Lsrcr\filterscripts\SQLite.pwn(83) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.



Re: SQLite help - =WoR=Varth - 24.06.2011

Are you sure you put " in your script?
Show me the line.


Re: SQLite help - Laronic - 24.06.2011

pawn Код:
db_free_result(db_query(Database, "CREATE TABLE IF NOT EXISTS `Users` (`IP`,`Name`,`Password`,`Money`,`Score`,`AdminLevel`,`RegularPlayer`,`SavedWantedLevel`,`SavedJailTime`,`RobRank`,`RapeRank`,`DrugDealerRank`,`GunDealerRank`,`HitmanRank`,`MedicRank`,`BountyHunterRank`,`KidnapperRank`,`TerroristRank`,`HasBriefcase`,`BriefcaseMoney`,`BriefcaseC4`,`BriefcaseWeaponSlot1`,`BriefcaseWeaponAmmoSlot1`,`BriefcaseWeaponSlot2`,`BriefcaseWeaponAmmoSlot2`,`BriefcaseWeaponSlot3`,`BriefcaseWeaponAmmoSlot3`,`CanUseSWAT`,`CanUseFBI`,`CanUseArmy`,`CopRank`,`Tazes`,`Cuffs`,`Arrests`,`SWATRank`,`FBIRank`,`ArmyRank`,`BanTime`,`BanReason`,`AdminWhoBanned`,`GrottiOwner`,`WangCarsOwner`,`OttosAutosOwner`,`AutobahnOwner`,`LSDrugHouseOwner`,`SFDrugHouseOwner`,`LVDrugHouseOwner`,`LSAirportOwner`,`SFAirportOwner`,`LVAirportOwner`,`YugoAirportOwner`)"));



Re: SQLite help - PCheriyan007 - 24.06.2011

Код:
This forum requires that you wait 120 seconds between posts. Please try again in 59 seconds.
pawn Код:
db_free_result(db_query(Database,"CREATE TABLE IF NOT EXISTS `Users` (`IP`,`Name`,`Password`,`Money`,`Score`,`AdminLevel`,`RegularPlayer`,`SavedWantedLevel`,`SavedJailTime`,`RobRank`,`RapeRank`,`DrugDealerRank`,`GunDealerRank`,`HitmanRank`,`MedicRank`,`BountyHunterRank`,`KidnapperRank`,`TerroristRank`,`HasBriefcase`,`BriefcaseMoney`,`BriefcaseC4`,`BriefcaseWeaponSlot1`,`BriefcaseWeaponAmmoSlot1`,`BriefcaseWeaponSlot2`,`BriefcaseWeaponAmmoSlot2`,`BriefcaseWeaponSlot3`,`BriefcaseWeaponAmmoSlot3`,`CanUseSWAT`,`CanUseFBI`,`CanUseArmy`,`CopRank`,`Tazes`,`Cuffs`,`Arrests`,`SWATRank`,`FBIRank`,`ArmyRank`,`BanTime`,`BanReason`,`AdminWhoBanned`,`GrottiOwner`,`WangCarsOwner`,`OttosAutosOwner`,`AutobahnOwner`,`LSDrugHouseOwner`,`SFDrugHouseOwner`,`LVDrugHouseOwner`,`LSAirportOwner`,`SFAirportOwner`,`LVAirportOwner`,`YugoAirportOwner`)"));
It looks nearly identical to the example that you posted earlier.


Re: SQLite help - Laronic - 24.06.2011

Sorry, i didnt notice


Re: SQLite help - PCheriyan007 - 24.06.2011

I'm trying out something that my friend showed me.
pawn Код:
public OnFilterScriptInit( )
{
    new Query[1024];
    Database = db_open("SArcr.db");
    format(Query, sizeof(Query),"CREATE TABLE IF NOT EXISTS `Users` (`IP`,`Name`,`Password`,`Money`,`Score`,`AdminLevel`,`RegularPlayer`,`SavedWantedLevel`,`SavedJailTime`,`RobRank`,`RapeRank`,`DrugDealerRank`,`GunDealerRank`,`HitmanRank`,`MedicRank`,`BountyHunterRank`,`KidnapperRank`,`TerroristRank`,`HasBriefcase`,`BriefcaseMoney`,`BriefcaseC4`,`BriefcaseWeaponSlot1`,`BriefcaseWeaponAmmoSlot1`,`BriefcaseWeaponSlot2`,`BriefcaseWeaponAmmoSlot2`,`BriefcaseWeaponSlot3`,`BriefcaseWeaponAmmoSlot3`,`CanUseSWAT`,`CanUseFBI`,`CanUseArmy`,`CopRank`,`Tazes`,`Cuffs`,`Arrests`,`SWATRank`,`FBIRank`,`ArmyRank`,`BanTime`,`BanReason`,`AdminWhoBanned`,`GrottiOwner`,`WangCarsOwner`,`OttosAutosOwner`,`AutobahnOwner`,`LSDrugHouseOwner`,`SFDrugHouseOwner`,`LVDrugHouseOwner`,`LSAirportOwner`,`SFAirportOwner`,`LVAirportOwner`,`YugoAirportOwner`)");
    db_free_result(db_query(Database, Query));
    return 1;
}
Still getting same errors though :/


Re: SQLite help - =WoR=Varth - 24.06.2011

Example of mine
pawn Код:
new DB:USERDB,DBResult:Result;

USERDB = db_open("123.db");
db_free_result(db_query(USERDB,"CREATE TABLE IF NOT EXISTS `A` (`q`,`w`,`e`)"));
db_free_result(Result);



Re: SQLite help - PCheriyan007 - 24.06.2011

same errors no matter what i do lol