Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Recommended Posts

Posted

Salut , am un gamemode cu versiune mai vechie e pe Ysy, si vroiam sa fac altfel cum se updata playeri pe acest gamemode.
Specific ca vreau sa il fac intr-un include!

Ps: Nu sunt asa experimentat fara critici.

Errors: (Poza)(     https://imgur.com/a/laxW1     )
Code Errors:

-=-C:\Users\KnnT\Desktop\gm nou\pawno\include\myacc.inc(350) : error 029: invalid expression, assumed zero
-=-C:\Users\KnnT\Desktop\gm nou\pawno\include\myacc.inc(355) : error 029: invalid expression, assumed zero
-=-C:\Users\KnnT\Desktop\gm nou\pawno\include\myacc.inc(360) : error 029: invalid expression, assumed zero

Code(pawno):
public Update(playerid, type)
{
if(IsPlayerConnected(playerid))
{
gQuery[0] = (EOS);
{
switch(type)
             {
              case pLevelx:
              {
             format(gQuery, sizeof(gQuery), "UPDATE `players` SET `Level`='%d' WHERE `ID`='%d'", PlayerInfo[playerid][pLevel], 
              PlayerInfo[playerid] [pMysqlID]);           
              mysql_query(handle, gQuery);
               }
              case pAdminx:
               {
               format(gQuery, sizeof(gQuery), "UPDATE `players` SET `AdminLevel`='%d' WHERE `ID`='%d'", PlayerInfo[playerid][pAdmin],                                    PlayerInfo[playerid][pMysqlID]);
                mysql_query(handle, gQuery);
                }
                case pHelperx:
                 {
                format(gQuery, sizeof(gQuery), "UPDATE `players` SET `HelperLevel`='%d' WHERE `ID`='%d'", PlayerInfo[playerid][pHelper],                                   PlayerInfo[playerid][pMysqlID]);
                mysql_query(handle, gQuery);
                 }
               }
            }
       }
      return 1;
}

include(download): http://www.mediafire.com/file/hndspepa22xbuxz/myacc.inc
Multumesc! 

Posted (edited)

case "pLevelx"
case " pAdminx"
case " pHelperx"

sau eu iti recomand sa transformi switch-ul in if/else if.
if(type == "pLevelx") etc

//Aparent am gresit, nu prea le am cu aceste metode.

Edited by cristiviteza

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.