Jump to content

Question

Posted

Salut...

[pawn]C:\Users\thedarkone\Desktop\darkgamemode\pawno\DG.pwn(52845) : warning 209: function "CustomPickups" should return a value

C:\Users\thedarkone\Desktop\darkgamemode\pawno\DG.pwn(57263) : warning 225: unreachable code

C:\Users\thedarkone\Desktop\darkgamemode\pawno\DG.pwn(57264) : error 030: compound statement not closed at the end of file (started at line 57264)

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Error.

[/pawn]

57264 : nu exista

Linii :

52845 :

[pawn] PlayerInfo[pMissionNr] = PlayerOnMission;

MissionCheckpoint = 0;

PlayerOnMission = 0;

}

}

}

}<-(52845)[/pawn]

57263:[pawn]strtok(const string[], &index)

{

new length = strlen(string);

while ((index < length) && (string[index] <= ' '))

{

index++;

}

new offset = index;

new result[20];

while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))

{

result[index - offset] = string[index];

index++;

}

result[index - offset] = EOS;

return result;

{<-(57263)[/pawn]

7 answers to this question

Recommended Posts

Posted

@Gireada

am facut ceva ce ai spus si acum au aparut si mai multe erori :

[pawn]C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(17568) : error 033: array must be indexed (variable "cmd")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(17641) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(17769) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(17800) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(17907) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(17972) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18034) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18057) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18064) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18087) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18096) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18149) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18173) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18181) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18205) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18246) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18254) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18383) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18752) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18794) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18956) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(18990) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(19028) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(19064) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(19386) : error 033: array must be indexed (variable "tmp")

C:\Users\TheDarkOne\Desktop\darkgamemode\pawno\DG.pwn(19554) : error 033: array must be indexed (variable "tmp")

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

26 Errors.[/pawn]

Liniile sunt urmatoarele:

17641:

[pawn]tmp = strtok(cmdtext, idx);[/pawn]

17769:

[pawn]tmp = strtok(cmdtext, idx);[/pawn]

17800:

[pawn]tmp = strtok(cmdtext,idx);[/pawn]

si asa mai departe...toate liniile sunt asemanatoare!

Posted

am schimbat result din 20 in 100 cum ai spus iar acum primesc doar 4 erori :

[pawn]C:\Users\thedarkone\Desktop\darkgamemode\pawno\DG.pwn(20603) : error 047: array sizes do not match, or destination array is too small

C:\Users\thedarkone\Desktop\darkgamemode\pawno\DG.pwn(20948) : error 047: array sizes do not match, or destination array is too small

C:\Users\thedarkone\Desktop\darkgamemode\pawno\DG.pwn(21609) : error 047: array sizes do not match, or destination array is too small

C:\Users\thedarkone\Desktop\darkgamemode\pawno\DG.pwn(52845) : warning 209: function "CustomPickups" should return a value

C:\Users\thedarkone\Desktop\darkgamemode\pawno\DG.pwn(57264) : warning 225: unreachable code

C:\Users\thedarkone\Desktop\darkgamemode\pawno\DG.pwn(57265) : error 030: compound statement not closed at the end of file (started at line 57265)

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.[/pawn]

linii:

20603:  [pawn] x_nr = strtok(cmdtext, idx);[/pawn]

20948:    [pawn]x_nr = strtok(cmdtext, idx);[/pawn]

21609:    [pawn]x_nr = strtok(cmdtext, idx);[/pawn]

52845:  [pawn]}[/pawn]

57264:  [pawn]{[/pawn]

57265: nu exista cea de deasupra(57264) este ultima

Posted

am schimbat

[pawn]new x_nr[100];[/pawn]

si am ramas doar cu 1 eroare:

[pawn]C:\Users\thedarkone\Desktop\darkgamemodegamemode\pawno\DG.pwn(52845) : warning 209: function "CustomPickups" should return a value

C:\Users\thedarkone\Desktop\darkgamemode\pawno\DG.pwn(57264) : warning 225: unreachable code

C:\Users\thedarkone\Desktop\darkgamemode\pawno\DG.pwn(57265) : error 030: compound statement not closed at the end of file (started at line 57265)

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Error.

[/pawn]

Functia custom pickups:

[pawn]public CustomPickups()

{

new Float:oldposx, Float:oldposy, Float:oldposz;

new string[128];

for(new i = 0; i < MAX_PLAYERS; i++)

{

if(IsPlayerConnected(i))

{

GetPlayerPos(i, oldposx, oldposy, oldposz);

new tmpcar = GetPlayerVehicleID(i);

if(oldposx!=0.0 && oldposy!=0.0 && oldposz!=0.0)

{

for(new h = 0; h < sizeof(SBizzInfo); h++)

{

if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))

{

format(string, sizeof(string), "~w~%s~n~~r~Products Required~w~: %d~n~~y~Price per Product: ~w~: $%d~n~~g~Funds: ~w~: $%d",SBizzInfo[h][sbMessage],(SBizzInfo[h][sbMaxProducts]-SBizzInfo[h][sbProducts]),SBizzInfo[h][sbPriceProd],SBizzInfo[h][sbTill]);

GameTextForPlayer(i, string, 5000, 3);

return 1;

}

if(PlayerToPoint(2.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))

{

if(SBizzInfo[h][sbOwned] == 1)

{

format(string, sizeof(string), "~w~%s~w~~n~Owner : %s~n~Extortion by : %s~n~Entrance Fee : ~g~$%d ~n~~w~to enter type /enter",SBizzInfo[h][sbMessage],SBizzInfo[h][sbOwner],SBizzInfo[h][sbExtortion],SBizzInfo[h][sbEntranceCost]);

}

else

{

format(string, sizeof(string), "~w~%s~w~~n~This Business is for sale~n~Cost: ~g~$%d ~w~Level : %d ~n~to buy this Business type /buybiz",SBizzInfo[h][sbMessage],SBizzInfo[h][sbBuyPrice],SBizzInfo[h][sbLevelNeeded]);

}

GameTextForPlayer(i, string, 5000, 3);

return 1;

}

}

for(new h = 0; h < sizeof(BizzInfo); h++)

{

if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))

{

format(string, sizeof(string), "~w~%s~n~~r~Products Required~w~: %d~n~~y~Price per Product: ~w~: $%d~n~~g~Funds: ~w~: $%d",BizzInfo[h][bMessage],(BizzInfo[h][bMaxProducts]-BizzInfo[h][bProducts]),BizzInfo[h][bPriceProd],BizzInfo[h][bTill]);

GameTextForPlayer(i, string, 5000, 3);

return 1;

}

if(PlayerToPoint(2.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))

{

if(BizzInfo[h][bOwned] == 1)

{

format(string, sizeof(string), "~w~%s~w~~n~Owner : %s~n~Extortion by : %s~n~Entrance Fee : ~g~$%d ~n~~w~to enter type /enter",BizzInfo[h][bMessage],BizzInfo[h][bOwner],BizzInfo[h][bExtortion],BizzInfo[h][bEntranceCost]);

}

else

{

format(string, sizeof(string), "~w~%s~w~~n~This Business is for sale~n~Cost: ~g~$%d ~w~Level : %d ~n~to buy this Business type /buybiz",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]);

}

GameTextForPlayer(i, string, 5000, 3);

return 1;

}

}[/pawn]

Posted

[pawn]public CustomPickups()

{

new Float:oldposx, Float:oldposy, Float:oldposz;

new string[128];

for(new i = 0; i < MAX_PLAYERS; i++)

{

if(IsPlayerConnected(i))

{

GetPlayerPos(i, oldposx, oldposy, oldposz);

new tmpcar = GetPlayerVehicleID(i);

if(oldposx!=0.0 && oldposy!=0.0 && oldposz!=0.0)

{

for(new h = 0; h < sizeof(SBizzInfo); h++)

{

if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))

{

format(string, sizeof(string), "~w~%s~n~~r~Products Required~w~: %d~n~~y~Price per Product: ~w~: $%d~n~~g~Funds: ~w~: $%d",SBizzInfo[h][sbMessage],(SBizzInfo[h][sbMaxProducts]-SBizzInfo[h][sbProducts]),SBizzInfo[h][sbPriceProd],SBizzInfo[h][sbTill]);

GameTextForPlayer(i, string, 5000, 3);

return 1;

}

if(PlayerToPoint(2.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))

{

if(SBizzInfo[h][sbOwned] == 1)

{

format(string, sizeof(string), "~w~%s~w~~n~Owner : %s~n~Extortion by : %s~n~Entrance Fee : ~g~$%d ~n~~w~to enter type /enter",SBizzInfo[h][sbMessage],SBizzInfo[h][sbOwner],SBizzInfo[h][sbExtortion],SBizzInfo[h][sbEntranceCost]);

}

else

{

format(string, sizeof(string), "~w~%s~w~~n~This Business is for sale~n~Cost: ~g~$%d ~w~Level : %d ~n~to buy this Business type /buybiz",SBizzInfo[h][sbMessage],SBizzInfo[h][sbBuyPrice],SBizzInfo[h][sbLevelNeeded]);

}

GameTextForPlayer(i, string, 5000, 3);

return 1;

}

}

for(new h = 0; h < sizeof(BizzInfo); h++)

{

if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))

{

format(string, sizeof(string), "~w~%s~n~~r~Products Required~w~: %d~n~~y~Price per Product: ~w~: $%d~n~~g~Funds: ~w~: $%d",BizzInfo[h][bMessage],(BizzInfo[h][bMaxProducts]-BizzInfo[h][bProducts]),BizzInfo[h][bPriceProd],BizzInfo[h][bTill]);

GameTextForPlayer(i, string, 5000, 3);

return 1;

}

if(PlayerToPoint(2.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))

{

if(BizzInfo[h][bOwned] == 1)

{

format(string, sizeof(string), "~w~%s~w~~n~Owner : %s~n~Extortion by : %s~n~Entrance Fee : ~g~$%d ~n~~w~to enter type /enter",BizzInfo[h][bMessage],BizzInfo[h][bOwner],BizzInfo[h][bExtortion],BizzInfo[h][bEntranceCost]);

}

else

{

format(string, sizeof(string), "~w~%s~w~~n~This Business is for sale~n~Cost: ~g~$%d ~w~Level : %d ~n~to buy this Business type /buybiz",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]);

}

GameTextForPlayer(i, string, 5000, 3);

return 1;

}

}

}

}

}

return ( 1 ) ;

}[/pawn]

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.