SA-MP Forums Archive
Dafaq ? - 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)
+--- Thread: Dafaq ? (/showthread.php?tid=515533)



Dafaq ? - Johnson_Brooks - 26.05.2014

Well , today i converted my saving system on my gamemode from y_ini to mysql .
At first i compiled the mysql codes and stuff to see if i get any errors . Well , i didn't .
After that , i started adding my gamemode into that testfile to see how it goes .
It didn't go well . I got these warnings :
Code:
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1537) : warning 219: local variable "ID" shadows a variable at a preceding level
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1539) : warning 213: tag mismatch
C:\Users\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1544) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1546) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1551) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1561) : warning 213: tag mismatch
C:\Users\esktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1568) : warning 213: tag mismatch
C:\Users\top\GTA SA-MP Server\gamemodes\Testmysql.pwn(1571) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1575) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1577) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1579) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1584) : warning 213: tag mismatch
C:\Users\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1585) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1586) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1587) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1588) : warning 213: tag mismatch
C:\Users\ SA-MP Server\gamemodes\Testmysql.pwn(1537) : warning 203: symbol is never used: "ID"
C:\Users\ Server\gamemodes\Testmysql.pwn(1598) : warning 219: local variable "ID" shadows a variable at a preceding level
C:\Users\ Server\gamemodes\Testmysql.pwn(1600) : warning 213: tag mismatch
C:\Users\ SA-MP Server\gamemodes\Testmysql.pwn(1605) : warning 213: tag mismatch
C:\Users\.pwn(1607) : warning 213: tag mismatch
C:\Users\.pwn(1612) : warning 213: tag mismatch
C:\Users\GTA SA-MP Server\gamemodes\Testmysql.pwn(1617) : warning 213: tag mismatch
C:\Users\ SA-MP Server\gamemodes\Testmysql.pwn(1622) : warning 213: tag mismatch
C:\Users\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1629) : warning 213: tag mismatch
C:\Users\esktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1630) : warning 213: tag mismatch
C:\Users\sktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1632) : warning 213: tag mismatch
C:\Users\sktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1633) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1635) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1598) : warning 203: symbol is never used: "ID"
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1676) : warning 219: local variable "ID" shadows a variable at a preceding level
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1678) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1678) : warning 213: tag mismatch
C:\Users\ SA-MP Server\gamemodes\Testmysql.pwn(1679) : warning 213: tag mismatch
C:\Users\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1680) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1685) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1690) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1697) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1700) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1702) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1676) : warning 203: symbol is never used: "ID"
C:\Users\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1776) : warning 219: local variable "Score" shadows a variable at a preceding level
C:\Userss\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1778) : warning 213: tag mismatch
C:\Users\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1778) : warning 213: tag mismatch
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1776) : warning 203: symbol is never used: "Score"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Actually under onplayerdeath :
I was getting an error because of this :
pawn Code:
PlayerInfo[killerid][Kills]++;
    PlayerInfo[playerid][Deaths]++;
After i changed it to :
pawn Code:
pInfo[killerid][Kills]++;
    pInfo[playerid][Deaths]++;
I got all these warnings .
The original error:
Code:
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1037) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1037) : warning 215: expression has no effect
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1037) : error 001: expected token: ";", but found "]"
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1037) : error 029: invalid expression, assumed zero
C:\Users\\Desktop\GTA SA-MP Server\gamemodes\Testmysql.pwn(1037) : fatal error 107: too many error messages on one line
I removed my name from users// just for my own reasons ...


Re: Dafaq ? - XK - 26.05.2014

Check if you defined pInfo in the testfile,it should be defined,and also check if it's pInfo or what..


Re: Dafaq ? - Awide - 26.05.2014

You have to give a value to kills and deaths when you create it, set it to 0 first time. You must do it before these:

pInfo[killerid][Kills]++;
pInfo[playerid][Deaths]++;


Re: Dafaq ? - Johnson_Brooks - 26.05.2014

Quote:
Originally Posted by Awide
View Post
You have to give a value to kills and deaths when you create it, set it to 0 first time. You must do it before these:

pInfo[killerid][Kills]++;
pInfo[playerid][Deaths]++;
i know and its 0 for the first time .
When i change it to pInfo i get all these warnings .
When i change it to PlayerInfo i get those 4 errors .
And the warnings as far as i've seen are false warnings .


Re: Dafaq ? - XK - 26.05.2014

as i have told you,you havent defined them in the new file or it's not pInfo,another thing


Re: Dafaq ? - Johnson_Brooks - 26.05.2014

it is pInfo .
pawn Code:
enum PlayerInfo {
    ID,
    Password[129],
    Admin,
    VIP,
    Money,
    Score,
    Kills,
    Deaths,
    Banned
}
new pInfo[MAX_PLAYERS][PlayerInfo];



Re: Dafaq ? - Rittik - 26.05.2014

Okay , so open your game mode click on the replace button and then , in the first block type "PlayerInfo" and in the second type "pInfo" then press ok and replace PlayerInfo with pInfo.


Re: Dafaq ? - Johnson_Brooks - 26.05.2014

Quote:
Originally Posted by Rittik
View Post
Okay , so open your game mode click on the replace button and then , in the first block type "PlayerInfo" and in the second type "pInfo" then press ok and replace PlayerInfo with pInfo.
EVERYTHING else IS pInfo . Only that was PlayerInfo .