MySQL - Undefined symbol "query"
#6

Now Im doing it like this:

PHP код:
CMD:start(playeridparams[])
{
    if(
pInfo[playerid][Admin] >= 3)
    {
        new 
Mode[64],BaseID;
        
//new string[128];
        
if(sscanf(params,"sd",Mode,BaseID))return SendClientMessage(playerid0xFFFFFFFF,"{FFFFFF}Usage:{791A1A} /start [base | arena | ffa | tdm | ctf] [ID]");
        if(
strcmp(Mode,"base",true))
        {
            
BuildMode[playerid] = 1;
        }
        if(
strcmp(Mode,"arena",true)) SendClientMessage(playerid,0xFFFFFFFF,"Loift garnicht gut Bruder!");
        {
            new 
query[1024];
              
mysql_format(mysqlquerysizeof(query), "SELECT * FROM `arenas` WHERE `ID` = '%d' LIMIT 1"RoundInfo[playerid][ID]);
            
mysql_tquery(mysqlquery"OnArenaLoad""i"playerid);
        }
        if(
strcmp(Mode,"ctf",true))
        {
            
BuildMode[playerid] = 1;
        }
        if(
strcmp(Mode,"tdm",true))
        {
            
BuildMode[playerid] = 1;
        }
        if(
strcmp(Mode,"ffa",true))
        {
            
BuildMode[playerid] = 1;
        }
        if(
strcmp(Mode,"off",true))
        {
            
BuildMode[playerid] = 0;
            
SpawnPlayer(playerid);
        }
    }
    else
    {
        
SendClientMessage(playerid,0xFFFFFFFF,"{FFFFFF}Error: {791A1A}Your Adminlevel is not high enough!");
    }
    return 
1;

PHP код:
public OnArenaLoad(playerid)
{
    
RoundInfo[playerid][ID] = cache_get_field_content_int(0"ID");
     
RoundInfo[playerid][BaseName] = cache_get_field_content_int(0"Interior"); //Line 1484
      
RoundInfo[playerid][Description] = cache_get_field_content_int(0"Admin");
       
RoundInfo[playerid][Creater] = cache_get_field_content_int(0"Kills");
    
RoundInfo[playerid][Interior] = cache_get_field_content_int(0"Deaths");
    
RoundInfo[playerid][aPosX] = cache_get_field_content_int(0"WeaponSlot1");
    
RoundInfo[playerid][aPosY] = cache_get_field_content_int(0"WeaponSlot1");
     
RoundInfo[playerid][aPosZ] = cache_get_field_content_int(0"WeaponSlot1");
      
RoundInfo[playerid][aFacingAng] = cache_get_field_content_int(0"WeaponAmmo1");
    
RoundInfo[playerid][dPosX] = cache_get_field_content_int(0"WeaponSlot1");
    
RoundInfo[playerid][dPosY] = cache_get_field_content_int(0"WeaponSlot1");
    
RoundInfo[playerid][dPosZ] = cache_get_field_content_int(0"WeaponSlot1");
    
RoundInfo[playerid][dFacingAng] = cache_get_field_content_int(0"WeaponAmmo1");
    return 
1;

And the Warnings/Errors

Quote:

C:\PeMfr\gamemodes\WarfieldNew.pwn(1484) : warning 213: tag mismatch
C:\PeMfr\gamemodes\WarfieldNew.pwn(1485) : warning 213: tag mismatch
C:\PeMfr\gamemodes\WarfieldNew.pwn(1486) : warning 213: tag mismatch
C:\PeMfr\gamemodes\WarfieldNew.pwn(1486) : error 032: array index out of bounds (variable "RoundInfo")
C:\PeMfr\gamemodes\WarfieldNew.pwn(148 : warning 213: tag mismatch
C:\PeMfr\gamemodes\WarfieldNew.pwn(148 : error 032: array index out of bounds (variable "RoundInfo")
C:\PeMfr\gamemodes\WarfieldNew.pwn(1491) : warning 213: tag mismatch
C:\PeMfr\gamemodes\WarfieldNew.pwn(1491) : error 032: array index out of bounds (variable "RoundInfo")
C:\PeMfr\gamemodes\WarfieldNew.pwn(1492) : warning 213: tag mismatch
C:\PeMfr\gamemodes\WarfieldNew.pwn(1492) : error 032: array index out of bounds (variable "RoundInfo")
C:\PeMfr\gamemodes\WarfieldNew.pwn(1493) : warning 213: tag mismatch
C:\PeMfr\gamemodes\WarfieldNew.pwn(1493) : error 032: array index out of bounds (variable "RoundInfo")
C:\PeMfr\gamemodes\WarfieldNew.pwn(1494) : warning 213: tag mismatch
C:\PeMfr\gamemodes\WarfieldNew.pwn(1494) : error 032: array index out of bounds (variable "RoundInfo")
C:\PeMfr\gamemodes\WarfieldNew.pwn(1496) : warning 213: tag mismatch
C:\PeMfr\gamemodes\WarfieldNew.pwn(1496) : error 032: array index out of bounds (variable "RoundInfo")
C:\PeMfr\gamemodes\WarfieldNew.pwn(1497) : warning 213: tag mismatch
C:\PeMfr\gamemodes\WarfieldNew.pwn(1497) : error 032: array index out of bounds (variable "RoundInfo")
C:\PeMfr\gamemodes\WarfieldNew.pwn(149 : warning 213: tag mismatch
C:\PeMfr\gamemodes\WarfieldNew.pwn(149 : error 032: array index out of bounds (variable "RoundInfo")
C:\PeMfr\gamemodes\WarfieldNew.pwn(1499) : warning 213: tag mismatch
C:\PeMfr\gamemodes\WarfieldNew.pwn(1499) : error 032: array index out of bounds (variable "RoundInfo")

I dont understand why it isnt working, I just started learning MySQL and the Login/Registersystem works sweet but this just dont
Reply


Messages In This Thread
MySQL - Undefined symbol "query" - by Saize - 14.02.2015, 15:40
Re: MySQL - Undefined symbol "query" - by Golf - 14.02.2015, 15:46
Re: MySQL - Undefined symbol "query" - by AndySedeyn - 14.02.2015, 15:50
AW: Re: MySQL - Undefined symbol "query" - by Saize - 14.02.2015, 15:52
Re: AW: Re: MySQL - Undefined symbol "query" - by AndySedeyn - 14.02.2015, 15:53
AW: MySQL - Undefined symbol "query" - by Saize - 14.02.2015, 15:59
Re: MySQL - Undefined symbol "query" - by AndySedeyn - 14.02.2015, 16:01
AW: Re: MySQL - Undefined symbol "query" - by Saize - 14.02.2015, 16:04
Re: AW: Re: MySQL - Undefined symbol "query" - by AndySedeyn - 14.02.2015, 16:11
AW: Re: AW: Re: MySQL - Undefined symbol "query" - by Saize - 14.02.2015, 16:57

Forum Jump:


Users browsing this thread: 2 Guest(s)