14.02.2015, 15:59
Now Im doing it like this:
And the Warnings/Errors
I dont understand why it isnt working, I just started learning MySQL and the Login/Registersystem works sweet but this just dont
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!");
{
new query[1024];
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `arenas` WHERE `ID` = '%d' LIMIT 1", RoundInfo[playerid][ID]);
mysql_tquery(mysql, query, "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;
}
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") |