Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/sql-server-2008/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 按值传递的结构参数包含未初始化的数据_Ios_Objective C_Xcode_Cocos2d Iphone - Fatal编程技术网

Ios 按值传递的结构参数包含未初始化的数据

Ios 按值传递的结构参数包含未初始化的数据,ios,objective-c,xcode,cocos2d-iphone,Ios,Objective C,Xcode,Cocos2d Iphone,我在下面的代码部分中得到了以下“传递值结构参数包含未初始化数据”: for ( int i = 0; i < 48; i++ ) { CGPoint posLevel; LevelButton* pBtn; if ( i >= 0 && i < 24 ) { int nXX = (i % 4 + 1); if ( i < [pBtnArray count] ) {

我在下面的代码部分中得到了以下“传递值结构参数包含未初始化数据”:

for ( int i = 0; i < 48; i++ )
{

    CGPoint posLevel;
    LevelButton* pBtn;
    if ( i >= 0 && i < 24 )
    {
        int nXX = (i % 4 + 1);

        if ( i < [pBtnArray count] )
        {
            posLevel = ccp( (spMask.position.x - mySize.width / 2) + mySize.width / 5 * nXX, 
                           mySize.height - mySize.height / 7 * (i / 4 + 1));
            pBtn = [pBtnArray objectAtIndex:i];
            if ( pBtn != nil )
            {
                [pBtn move:posLevel];
            }

        }

    }
for(int i=0;i<48;i++)
{
cgp-posLevel;
水平按钮*pBtn;
如果(i>=0&&i<24)
{
int nXX=(i%4+1);
如果(i<[pBtnArray count])
{
posLevel=ccp((spMask.position.x-mySize.width/2)+mySize.width/5*nXX,
mySize.height-mySize.height/7*(i/4+1));
pBtn=[pBtnArray objectAtIndex:i];
如果(pBtn!=零)
{
[pBtn移动:posLevel];
}
}
}
使用xcode添加的箭头,如果这些帮助

一旦删除了注释掉的代码,这里就没有多少代码了,所以我不明白XCode抛出了什么问题


如果您能帮助删除此错误,我们将不胜感激!

屏幕截图中的代码如下所示

CGRect posLevel;
if (mySize.height < 568) {
    posLevel = ...;
}
if (mySize.height >= 568) {
    posLevel = ...;
}
[pBtn move:posLevel];
CGRect posLevel;
if (mySize.height < 568) {
    posLevel = ...;
} else {
    posLevel = ...;
}
[pBtn move:posLevel];