Compiler error
#1

When I compile my new version of my gamemode (v1.1c) I get this errors in the compiler output;

Код:
C:\Users\Kevin Burke\Desktop\CGRP\Backup\CGRP\gamemodes\CG-RPv1.pwn(1354) : error 017: undefined symbol "foreach"
C:\Users\Kevin Burke\Desktop\CGRP\Backup\CGRP\gamemodes\CG-RPv1.pwn(1354) : error 029: invalid expression, assumed zero
C:\Users\Kevin Burke\Desktop\CGRP\Backup\CGRP\gamemodes\CG-RPv1.pwn(1354) : error 017: undefined symbol "i"
C:\Users\Kevin Burke\Desktop\CGRP\Backup\CGRP\gamemodes\CG-RPv1.pwn(1354) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Then I switch to line 1354, and this is in it;

Код:
    foreach(new i : Player)
I have foreach.inc in my pawno/includes, but shit aint working. I also have #include <foreach>

This is the whole code from line 1352-1359;

Код:
IsVehicleOccupied( vehicleid )
{
    foreach(new i : Player)
    {
     if( IsPlayerInVehicle( i, vehicleid ) ) return 1;
    }
    return 0;
}
Any solution?
Reply
#2

So you have foreach.inc in your includes folder, but do you have #include "foreach" in your gamemode ?
Reply
#3

Quote:
Originally Posted by Lumineux
Посмотреть сообщение
So you have foreach.inc in your includes folder, but do you have #include "foreach" in your gamemode ?
Yep I do.. Also this is the whole code from line 1352-1359

Код:
IsVehicleOccupied( vehicleid )
{
    foreach(new i : Player)
    {
     if( IsPlayerInVehicle( i, vehicleid ) ) return 1;
    }
    return 0;
}
Reply
#4

Someone please help me.
Reply
#5

Anybody?
Reply
#6

Hello?
Reply
#7

Come on, bump
Reply
#8

Код:
IsVehicleOccupied( vehicleid )
{
    foreach(Player, i)
    {
     if( IsPlayerInVehicle( i, vehicleid ) ) return 1;
    }
    return 0;
}
Maybe?
Reply
#9

Let me check, thanks bruh
Reply
#10

try with this http://www.solidfiles.com/d/6d56b1968c/
Код:
foreach(Player, i)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)