Posts: 54
Threads: 30
Joined: Aug 2014
Reputation:
0
public OnPlayerPickUpPickup(playerid, pickupid)
for(new i= 0; i < sizeof(pickup_Armour); i++)
{
if(pickupid == pickup_Armour[i])
{
new Float:armour;
GetPlayerArmour(playerid, armour);
SetPlayerArmour(playerid, armour+10);
}
return 1;
} <<<<<<<<<<<<<<<<<<<<<<<< THIS LINE 2369
Why I Compile I get Warning warning 209: function "Streamer_OnPlayerPickUpPickup" should return a value
Ex in down
//==================================
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2369) : warning 209: function "Streamer_OnPlayerPickUpPickup" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Please reply my Thread
Posts: 97
Threads: 9
Joined: Feb 2013
Reputation:
0
You are missing { in two parts. I would type then in. But sadly I cannot as I am on a phone. I will try but it will be a while before I can rewrite the code.... Unless you see where there missing? If you can't I'll retype it
Posts: 54
Threads: 30
Joined: Aug 2014
Reputation:
0
If I ADD Bracket
{ <<<
for(new i= 0; i < sizeof(pickup_Armour); i++)
{
I get this Crash
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2369) : error 079: inconsistent return types (array & non-array)
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2372) : error 029: invalid expression, assumed zero
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2372) : error 004: function "PlayerLeaveGang" is not implemented
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2401) : warning 209: function "Streamer_OnPlayerPickUpPickup" should return a value
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2409) : error 029: invalid expression, assumed zero
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2409) : error 017: undefined symbol "ReturnTime"
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2414) : error 078: function uses both "return" and "return <value>"
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2414) : error 090: public functions may not return arrays (symbol "Streamer_OnPlayerPickUpPickup")
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2417) : warning 225: unreachable code
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2417) : error 029: invalid expression, assumed zero
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2417) : error 017: undefined symbol "ReturnDate"
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2421) : error 017: undefined symbol "GetMonth"
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2422) : error 078: function uses both "return" and "return <value>"
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2422) : error 090: public functions may not return arrays (symbol "Streamer_OnPlayerPickUpPickup")
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2425) : warning 225: unreachable code
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2425) : error 029: invalid expression, assumed zero
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2425) : error 017: undefined symbol "GetMonth"
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2429) : error 017: undefined symbol "month"
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2456) : error 078: function uses both "return" and "return <value>"
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2456) : error 090: public functions may not return arrays (symbol "Streamer_OnPlayerPickUpPickup")
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2459) : warning 225: unreachable code
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2459) : error 029: invalid expression, assumed zero
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2459) : warning 221: label name "bool" shadows tag name
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2459) : error 017: undefined symbol "IsIPInText"
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2476) : error 017: undefined symbol "txt"
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2476) : warning 215: expression has no effect
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2476) : error 001: expected token: ";", but found "]"
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2476) : error 029: invalid expression, assumed zero
D:\AlexaGaming\gamemodes\AlexaaGaming.pwn(2476) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
23 Errors.
Posts: 97
Threads: 9
Joined: Feb 2013
Reputation:
0
Try this:
Add a { before your for(), loop.
Also add a } on the line before your return 1;
Sorry I can't type it for you!