Errors which im unable to correct :\
#1

Hey guys! im making my mode but i get errors for a /givecash command. But i got no clue on how to correct it. I looked on samp wiki but they're not clear for that.
Heres my errors:
C:\Program Files (x86)\Rockstar games\Gta San Andreas\dedicated server\gamemodes\pmkfunserver.pwn(547) : error 017: undefined symbol "string"
C:\Program Files (x86)\Rockstar games\Gta San Andreas\dedicated server\gamemodes\pmkfunserver.pwn(547) : error 017: undefined symbol "string"
C:\Program Files (x86)\Rockstar games\Gta San Andreas\dedicated server\gamemodes\pmkfunserver.pwn(547) : error 029: invalid expression, assumed zero
C:\Program Files (x86)\Rockstar games\Gta San Andreas\dedicated server\gamemodes\pmkfunserver.pwn(547) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


N here'S my script:
format(string, sizeof(string), "You've Given $%d To %s(player: %d).", giveplayer,giveplayerid, moneys);

But under this line, i've got a similar script line with the same begining ( format(string, sizeof(string), ) and it got no errors :\ What's wrong?

thanks
Reply
#2

You need to define a string:
pawn Код:
new
    string[128];
Quote:
Originally Posted by pmk1
format(string, sizeof(string), "You've Given $%d To %s(player: %d).", giveplayer,giveplayerid, moneys);
And you have mixed integer and string type.
Correct:
pawn Код:
format(string, sizeof(string), "You've Given $%d To %s(player: %d).", moneys, giveplayer, giveplayerid);
Reply
#3

ok thanks, ill try this aand post back to see if it works :P
Reply
#4

hmm there's still a problem... The new include string, do i put it under #include 's or under
if(strcmp(cmd, "/givecash", true) == 0)
{
new
giveplayerid,
playermoney,
moneys,
giveplayer[MAX_PLAYER_NAME],
sendername[MAX_PLAYER_NAME],
tmp[32];
tmp = strtok(cmdtext, idx);

Because in each cases i get 1 errors and multiple warnings :\
Reply
#5

hmm forget it, i fixed it. i had put return 0; 2 times but i thoughtthey were separate because of a
//-------------------------------------------------- line that i made later xd thanks!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)