Whats wrong in this code? +rep
#1

Errors

C:\Users\Dust\Desktop\Samp server\gamemodes\bp.pwn(146) : warning 202: number of arguments does not match definition
C:\Users\Dust\Desktop\Samp server\gamemodes\bp.pwn(147) : error 001: expected token: "*then", but found "{"
C:\Users\Dust\Desktop\Samp server\gamemodes\bp.pwn(149) : warning 202: number of arguments does not match definition

Heres the code.

Quote:

public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColor(playerid);

if GetPlayerSkin(playerid, 287)
{
new rand = random(sizeof(RandomUSASpawn));
SetPlayerPos(playerid, RandomUSASpawn[rand][0],RandomUSASpawn[rand][1],RandomUSASpawn[rand][2],RandomUSASpawn[rand][3]);
}
return 1;
}

My array is set up correctly but I have No Damn idea whats the error highlighted in red is, or how to fix it.
JUST INCASE its my aray. Here it is.

Quote:

new Float:RandomUSASpawn[][4] =
{
{289.5552,1896.6105,17.6406,270.0378},
{289.5629,1885.3944,17.6406,267.6761},
{290.0782,1855.7422,17.6406,267.8445},
{291.0180,1850.6392,17.6406,271.2911},
{292.0120,1844.9946,17.6406,260.3243}
}

Reply
#2

pawn Код:
public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColor(playerid);
new skin;
skin = GetPlayerSkin(playerid); // GetPlayerSkin(playerid); no more arguments
if (skin == 287)
{
new rand = random(sizeof(RandomUSASpawn));
SetPlayerPos(playerid, RandomUSASpawn[rand][0],RandomUSASpawn[rand][1],RandomUSASpawn[rand][2]); // one extra argument , also, fix your random float.
}
return 1;
}
Reply
#3

Hm, On the End of Your

Quote:

new Float:RandomUSASpawn[][4] =
{
{289.5552,1896.6105,17.6406,270.0378},
{289.5629,1885.3944,17.6406,267.6761},
{290.0782,1855.7422,17.6406,267.8445},
{291.0180,1850.6392,17.6406,271.2911},
{292.0120,1844.9946,17.6406,260.3243}
}

You May be Missing a ;.
Reply
#4

Sometimes People on here make me feel as a dumbass. Thanks for the assistance, This has been halting my progress all night.

Now im getting somthing real strange on another note.
Quote:

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

Quote:

C:\Users\Dust\Desktop\Samp server\gamemodes\bp.pwn(19) : error 001: expected token: ";", but found "-identifier-"

I think I just solved it
Reply
#5

Can you Show some Coding Below & Above?

Cheers,

As for the Dumbass, We Can only Learn from Mistakes, If Its not Pointed Out, There's Really no point in Learing.

Cheers, Ricey.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)