SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 27/12/2013, 08:18 AM   #1
botak
Big Clucker
 
botak's Avatar
 
Join Date: Sep 2013
Location: Indonesia
Posts: 97
Reputation: 8
Post warning 215: expression has no effect & warning 235: public function lacks forward declaration

D:\New Server\raven\gamemodes\GGRP.pwn(732) : warning 215: expression has no effect
D:\New Server\raven\gamemodes\GGRP.pwn(4134) : warning 235: public function lacks forward declaration (symbol "Audio_OnSetPack")

here are the script that have a warning 215
Code:
PlayerText:CreateModelPreviewTextDraw(playerid, modelindex, Float:Xpos, Float:Ypos, Float:width, Float:height)
{
    new PlayerText:txtPlayerSprite = CreatePlayerTextDraw(playerid, Xpos, Ypos, ""); // it has to be set with SetText later
    PlayerTextDrawColor(playerid, txtPlayerSprite, 0xFFFFFFFF);
    PlayerTextDrawBackgroundColor(playerid, txtPlayerSprite, 0x88888899);
    PlayerTextDrawTextSize(playerid, txtPlayerSprite, width, height); // Text size is the Width:Height
    PlayerTextDrawSetPreviewModel(playerid, txtPlayerSprite, modelindex);
    PlayerTextDrawSetSelectable(playerid, txtPlayerSprite, 1);
    PlayerTextDrawShow(playerid,txtPlayerSprite);
    return txtPlayerSprite;
}
And here are the script that have warning 235
Code:
public Audio_OnSetPack(audiopack[])
{
	foreach(Player, i)
	{
	    Audio_TransferPack(i);
	}
	return 1;
}
botak is offline   Reply With Quote
Old 27/12/2013, 09:10 AM   #2
Aliassassin123456
Banned
 
Join Date: Apr 2013
Location: 0x7f000001
Posts: 232
Reputation: 67
Default Re: warning 215: expression has no effect & warning 235: public function lacks forward declaration

pawn Code:
stock PlayerText:CreateModelPreviewTextDraw(playerid, modelindex, Float:Xpos, Float:Ypos, Float:width, Float:height)
{
    new PlayerText:txtPlayerSprite = CreatePlayerTextDraw(playerid, Xpos, Ypos, ""); // it has to be set with SetText later
    PlayerTextDrawColor(playerid, txtPlayerSprite, 0xFFFFFFFF);
    PlayerTextDrawBackgroundColor(playerid, txtPlayerSprite, 0x88888899);
    PlayerTextDrawTextSize(playerid, txtPlayerSprite, width, height); // Text size is the Width:Height
    PlayerTextDrawSetPreviewModel(playerid, txtPlayerSprite, modelindex);
    PlayerTextDrawSetSelectable(playerid, txtPlayerSprite, 1);
    PlayerTextDrawShow(playerid,txtPlayerSprite);
    return txtPlayerSprite;
}

forward Audio_OnSetPack(audiopack[]);
public Audio_OnSetPack(audiopack[])
{
    foreach(Player, i)
    {
        Audio_TransferPack(i);
    }
    return 1;
}
Aliassassin123456 is offline   Reply With Quote
Old 27/12/2013, 09:17 AM   #3
J4mmyHD
Huge Clucker
 
J4mmyHD's Avatar
 
Join Date: Oct 2012
Location: United Kingdom
Posts: 274
Reputation: 42
Default Re: warning 215: expression has no effect & warning 235: public function lacks forward declaration

pawn Code:
forward Audio_OnSetPack(audiopack[]);

Add this to your script.
__________________
J4mmyHD is offline   Reply With Quote
Old 27/12/2013, 09:18 AM   #4
Aliassassin123456
Banned
 
Join Date: Apr 2013
Location: 0x7f000001
Posts: 232
Reputation: 67
Default Re: warning 215: expression has no effect & warning 235: public function lacks forward declaration

Quote:
Originally Posted by J4mmyHD View Post
pawn Code:
forward Audio_OnSetPack(audiopack[]);

Add this to your script.
What i said ha?
Aliassassin123456 is offline   Reply With Quote
Old 27/12/2013, 12:38 PM   #5
botak
Big Clucker
 
botak's Avatar
 
Join Date: Sep 2013
Location: Indonesia
Posts: 97
Reputation: 8
Default Re: warning 215: expression has no effect & warning 235: public function lacks forward declaration

Quote:
Originally Posted by Aliassassin123456 View Post
pawn Code:
stock PlayerText:CreateModelPreviewTextDraw(playerid, modelindex, Float:Xpos, Float:Ypos, Float:width, Float:height)
{
    new PlayerText:txtPlayerSprite = CreatePlayerTextDraw(playerid, Xpos, Ypos, ""); // it has to be set with SetText later
    PlayerTextDrawColor(playerid, txtPlayerSprite, 0xFFFFFFFF);
    PlayerTextDrawBackgroundColor(playerid, txtPlayerSprite, 0x88888899);
    PlayerTextDrawTextSize(playerid, txtPlayerSprite, width, height); // Text size is the Width:Height
    PlayerTextDrawSetPreviewModel(playerid, txtPlayerSprite, modelindex);
    PlayerTextDrawSetSelectable(playerid, txtPlayerSprite, 1);
    PlayerTextDrawShow(playerid,txtPlayerSprite);
    return txtPlayerSprite;
}

forward Audio_OnSetPack(audiopack[]);
public Audio_OnSetPack(audiopack[])
{
    foreach(Player, i)
    {
        Audio_TransferPack(i);
    }
    return 1;
}
Thanks for Audio Set Pack. but, in create model preview still be warned. the error is in
Code:
PlayerTextDrawSetPreviewModel(playerid, txtPlayerSprite, modelindex);
botak is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error 010: invalid function or declaration & warning 235: public function lacks forward declaration (symbol "Drag") tboysamp Scripting Help 1 14/04/2013 05:10 AM
warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg") aslan890 Scripting Help 3 23/12/2012 02:38 PM
Can't Fix Warning public function lacks forward declaration Immortal_LTU Scripting Help 5 26/12/2011 04:10 PM
1 Warrning || warning 235: public function lacks forward declaration (symbol "op Pawel_Shark Scripting Help 8 12/12/2011 01:31 PM
warning 235: public function lacks forward declaration Scenario Help Archive 10 21/08/2011 08:30 AM


All times are GMT. The time now is 03:20 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.