Checking a string...
#1

hello

i dont really ask for help much but now i got nowhere to turn besides to the great scripters of sa-mp

anyways im making some pickups...i add them by creating a function then puting it in ongamemodeint or watever...

but now i ran into this small problem,when the player walks over the pickup i want the messege to say you are standing in pickup 1 or 2...

anyways heres an example


CreateExample (name[],Float:Hx,Float:Hy,Float:Hz)
{
CreatePickup(1273,23,Hx,Hy,Hz,0);
Create3DTextLabel(name,0xFF0000AA,Hx,Hy,Hz+20,20,0 );
}

public OnFilterScriptInit()
{
CreateExample("pickup 1",2029.6508,1343.2561,10.8203);
CreateExample("pickup 2",2029.4835,1340.2711,10.8203);
CreateExample("pickup 3",2029.9989,1345.3268,10.8203);

return 1;
}


public OnPlayerPickUpPickup(playerid, pickupid)
{
if (pickupid == 1273)
{
new string[25];
format(string,sizeof string,"you are standing in pickup %s",name);
SendClientMessage(playerid,0xFF0000AA,string);
}

return 1;
}



now theres the problem...im getting this error saying "error 017: undefined symbol "name""

the error is where it says "format". what im trying to do is i want it to get the name of the pickup (you will get the script when you take a look at it)

anyways...thanks
Reply


Messages In This Thread
Checking a string... - by Owenlishious - 26.08.2010, 06:06
Re: Checking a string... - by Retardedwolf - 26.08.2010, 06:32
Re: Checking a string... - by Owenlishious - 26.08.2010, 06:36
Re: Checking a string... - by Retardedwolf - 26.08.2010, 06:37
Re: Checking a string... - by Kyosaur - 26.08.2010, 06:57
Re: Checking a string... - by Owenlishious - 26.08.2010, 07:06
Re: Checking a string... - by Retardedwolf - 26.08.2010, 07:10
Re: Checking a string... - by Kyosaur - 26.08.2010, 07:15
Re: Checking a string... - by Owenlishious - 26.08.2010, 07:15
Re: Checking a string... - by Owenlishious - 26.08.2010, 07:19

Forum Jump:


Users browsing this thread: 2 Guest(s)