SA-MP Forums Archive
Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help (/showthread.php?tid=633635)



Help - Despacito - 04.05.2017

I have this errors:

Quote:

error 001: expected token: ",", but found "["
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
fatal error 107: too many error messages on one line

On this line:

pawn Код:
gPrototype[i][p_vehicle] = CreateVehicle(428, gPrototype[i][p_x], gPrototype[i][p_y], gPrototype[i][p_z], gPrototype[i][p_a],  gTeam[ gPrototype[i][p_owner] ][COLOR_RED], random(10), 60);
Full code:

pawn Код:
new string[56];
    for(new i; i < sizeof(gPrototype); i++)
    {
        gPrototype[i][p_vehicle] = CreateVehicle(428, gPrototype[i][p_x], gPrototype[i][p_y], gPrototype[i][p_z], gPrototype[i][p_a],  gTeam[ gPrototype[i][p_owner] ][COLOR_RED], random(10), 60);
        SetVehicleVirtualWorld(gPrototype[i][p_vehicle], MODE_TEAM_DEATHMATCH);
        format(string, sizeof(string), "%s Prototype", gTeam[ gPrototype[i][p_owner] ][E_NAME]);
        gPrototype[i][p_label] = CreateDynamic3DTextLabel(string, gTeam[ gPrototype[i][p_owner] ][COLOR_RED], 0.0, 0.0, 2.5, 50.0, _, gPrototype[i][p_vehicle], 0, MODE_TEAM_DEATHMATCH, -1);
        printf("** Prototype vehicle created for team %s, id: %i", gTeam[ gPrototype[i][p_owner] ][E_NAME], i);

        if(i == (sizeof(gPrototype) - 1)) printf("-> Total %i prototype vehicles created from gamemode!", (i + 1));
    }



Re: Help - Kane - 04.05.2017

Код:
gTeam[ gPrototype[i][p_owner] ]
This?


Re: Help - Despacito - 04.05.2017

So? Whats wrong


Re: Help - Toroi - 04.05.2017

PHP код:
gTeamgPrototype[i][p_owner] ][COLOR_RED
Everything from the above code is wrong.

What are you trying to pass to the color parameter?
Why are you using a defined color inside an array?
Why are you inserting what looks to be an array that holds an string ( gPrototype[i][p_owner] ) into another array ( gTeam[ ] ) ?