Pickup case help ..
#1

Hey Guys when i compiled my script i got this error

Код:
D:\SATDM v11 SA-MP 0.3e\filterscripts\LuxuriousHouse.pwn(462) : error 008: must be a constant expression; assumed zero
D:\SATDM v11 SA-MP 0.3e\filterscripts\LuxuriousHouse.pwn(462) : error 036: empty statement
D:\SATDM v11 SA-MP 0.3e\filterscripts\LuxuriousHouse.pwn(467) : error 010: invalid function or declaration
D:\SATDM v11 SA-MP 0.3e\filterscripts\LuxuriousHouse.pwn(452) : warning 204: symbol is assigned a value that is never used: "heliout"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
here is the pawn script i used

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    switch (pickupid)
    {

    case heli;
    {
    SetPlayerPos(playerid,-2383.6670,-1602.5835,507.5224);
    GameTextForPlayer(playerid, "~b~Teleported to ~g~Heli Stand", 3000, 5);
    }
    case heliout;
    {
    SetPlayerPos(playerid,-2325.2319,-1613.5901,483.7204);
    GameTextForPlayer(playerid, "~b~Back ~r~Home", 3000, 5);
    }

i defined it at the top of my script


pawn Код:
new heli;
new heliout;
Can anyone help me ??
Reply
#2

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == heli)
    {
        SetPlayerPos(playerid,-2383.6670,-1602.5835,507.5224);
        GameTextForPlayer(playerid, "~b~Teleported to ~g~Heli Stand", 3000, 5);
    }
    else if(pickupid == heliout)
    {
        SetPlayerPos(playerid,-2325.2319,-1613.5901,483.7204);
        GameTextForPlayer(playerid, "~b~Back ~r~Home", 3000, 5);
    }
    return 1;
}
Reply
#3

-removed-
Reply
#4

Thanks Guyz Reputed yew both ..
Reply
#5

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
pawn Код:
case heli:
{
    SetPlayerPos(playerid,-2383.6670,-1602.5835,507.5224);
    GameTextForPlayer(playerid, "~b~Teleported to ~g~Heli Stand", 3000, 5);
}
case heliout:
{
    SetPlayerPos(playerid,-2325.2319,-1613.5901,483.7204);
    GameTextForPlayer(playerid, "~b~Back ~r~Home", 3000, 5);
}
Learn how switch statements work.
How does that even work? The compiler cannot determine the values of these variables at compile time, so this shouldn't compile.
Reply
#6

Its ok.. !!
Reply
#7

Ok Vince, I have to go offtopic.

Your signature: "If your topic says "Help", I ignore it. Choose a descriptive title."

Topic name:
Pickup case 'help' ..

Did you just respond?
Yes you did ;p
Reply
#8

Quote:
Originally Posted by Vince
Посмотреть сообщение
How does that even work? The compiler cannot determine the values of these variables at runtime, so this shouldn't compile.
Didn't think about that. Edited my post.


Quote:
Originally Posted by SomebodyAndMe
Посмотреть сообщение
Ok Vince, I have to go offtopic.

Your signature: "If your topic says "Help", I ignore it. Choose a descriptive title."

Topic name:
Pickup case 'help' ..

Did you just respond?
Yes you did ;p
He corrected my misinforming post, and 'pickup case' is more descriptive than "HELP PLS REPP+++++"
Reply
#9

But still he says he ignores the topic if it says 'help' no matter if he corrected you or not.
Reply
#10

Quote:
Originally Posted by SomebodyAndMe
Посмотреть сообщение
But still he says he ignores the topic if it says 'help' no matter if he corrected you or not.
Just because 'help' was in the thread title, doesn't stop people from going through it. He went through it, saw my bad post, and corrected it. Anyways, this thread has strayed far enough off-topic.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)