14.02.2015, 15:40
Hey guys,
Iґm working a bit on an Attack and Defend gamemode and I want to create a command to start arenas.
So I created a stock where I can load all the datas that Iґm about to set for the players.
But My Problem is that it keeps telling me that the query isnt defined (im not even sure if the query is reading it from the right db!)
The Warnings/errors
And the codes
Iґm working a bit on an Attack and Defend gamemode and I want to create a command to start arenas.
So I created a stock where I can load all the datas that Iґm about to set for the players.
But My Problem is that it keeps telling me that the query isnt defined (im not even sure if the query is reading it from the right db!)
The Warnings/errors
Quote:
C:\PeMfr\gamemodes\WarfieldNew.pwn(136 : error 017: undefined symbol "query" C:\PeMfr\gamemodes\WarfieldNew.pwn(136 : error 017: undefined symbol "query" C:\PeMfr\gamemodes\WarfieldNew.pwn(136 : error 029: invalid expression, assumed zero C:\PeMfr\gamemodes\WarfieldNew.pwn(136 : fatal error 107: too many error messages on one line |
PHP код:
stock StartArena(playerid,ArenaID)
{
new rows, fields;
ArenaID = mysql_format(mysql, query, sizeof(query), "SELECT * FROM `arenas` WHERE `ID` = '%d' LIMIT 1", RoundInfo[playerid][ID]);
//Line 1368
// ArenaID = cache_get_field_content_int(0, "ID");
if(rows)
{
//let's format our query
//We select all rows in the table that has your name and limit the result to 1
RoundInfo[playerid][ID] = cache_get_field_content_int(0, "ID");
RoundInfo[playerid][BaseName] = cache_get_field_content_int(0, "Name");
RoundInfo[playerid][Description] = cache_get_field_content_int(0, "Description");
RoundInfo[playerid][Creater] = cache_get_field_content_int(0, "Creater");
RoundInfo[playerid][Interior] = cache_get_field_content_int(0, "Interior");
RoundInfo[playerid][aPosX] = cache_get_field_content_int(0, "aPosX");
RoundInfo[playerid][aPosY] = cache_get_field_content_int(0, "aPosY");
RoundInfo[playerid][aPosZ] = cache_get_field_content_int(0, "aPosZ");
RoundInfo[playerid][aFacingAng] = cache_get_field_content_int(0, "aFacingAng");
RoundInfo[playerid][dPosX] = cache_get_field_content_int(0, "dPosX");
RoundInfo[playerid][dPosY] = cache_get_field_content_int(0, "dPosY");
RoundInfo[playerid][dPosZ] = cache_get_field_content_int(0, "dPosZ");
RoundInfo[playerid][dFacingAng] = cache_get_field_content_int(0, "dFacingAng");
printf(query); //DEBUG
}
return 1;
}
PHP код:
CMD:start(playerid, params[])
{
if(pInfo[playerid][Admin] >= 3)
{
new Mode[64],BaseID;
//new string[128];
if(sscanf(params,"sd",Mode,BaseID))return SendClientMessage(playerid, 0xFFFFFFFF,"{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!");
{
StartArena(playerid,BaseID);
}
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;
}