Help me please
#1

Hello! I am making some trucking server and i have problem in script.

Errors:
Код HTML:
C:\Documents and Settings\Admin\Рабочий стол\Server\gamemodes\Trucking.pwn(925) : error 028: invalid subscript (not an array or too many subscripts): "fuel"
C:\Documents and Settings\Admin\Рабочий стол\Server\gamemodes\Trucking.pwn(925) : warning 215: expression has no effect
C:\Documents and Settings\Admin\Рабочий стол\Server\gamemodes\Trucking.pwn(925) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Admin\Рабочий стол\Server\gamemodes\Trucking.pwn(925) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Admin\Рабочий стол\Server\gamemodes\Trucking.pwn(925) : fatal error 107: too many error messages on one line

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


4 Errors.
Line 925:
Код HTML:
fuel[i] = 100;
What i do ? please help me. Thank you in advance!
Reply
#2

That [i] statement is only used when you have looped through something. And as far as i guessed you haven't looped through the "fuel" thingy and used [i] directly. Can you show the function that has this line?
Reply
#3

Yeah. That's in "OnGameModeInit".

Quote:

for(new i = 0; i < MAX_VEHICLES; i++)
{
new str[32];
fuel[i] = 100;
format(str,sizeof(str),"UT 5%03i",i);
SetVehicleNumberPlate(i,str);
}
SetTimer("fuel",70000,true);

Reply
#4

pawn Код:
new str[32];
for(new i = 0; i < MAX_VEHICLES; i++)
{
    fuel[i] = 100;
    SetVehicleNumberPlate(i,str);
    format(str,sizeof(str),"UT 5%03i",i);
}
SetTimer("fuel",70000,true);
Try that?
Reply
#5

The same error again.
Reply
#6

Do you have that "fuel" thingy defined anywhere? Also tell me which gamemode are you editing (if its a downloaded one) I am also scripting a trucking server so i might be able to help you.
Reply
#7

Yeah, i have defined as "new fuel[MAX_VEHICLES];" on the TOP.

I am editing "Ultimate Trucking 2.0".

If you have skype, add me: mc.zaz98

thank you.
Reply
#8

I have compiled the script on Ultimate Trucking and it worked fine without any errors warnings. There might be something wrong on your gamemode. Maybe you did something wrong while editing it?
Reply
#9

No. I just replace all "fuel" word to "Benzini" and after that, i get errors. After i replace all "Benzini" to "fuel" for fix, but it not fixed.
Reply
#10

Ok, copy all your gamemode's script and paste it on pastebin.com then send it to me via forum pm. I will try to fix it for you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)