Help Please! +ReP!
#1

Код:
C:\Users\12123232\Desktop\myGM\gamemodes\grandlarc.pwn(135) : error 001: expected token: ";", but found "-identifier-"
Line 135:

Код:
format(string, sizeof(string), "You have set %s's virtual world to %d.");
PLease Help Me!
Reply
#2

pawn Код:
new string[126],targetid;
format(string, sizeof(string), "You have set %s's virtual world to %d.",GetPlayerNameEx(targetid),GetPlayerVirtualWorld(targetid));
//sendclientmessage or dialog with string..
Also add this anywhere in your script
pawn Код:
stock GetPlayerNameEx(playerid)
{
     new pName[25];
     GetPlayerName(playerid, pName, sizeof(pName));
     return pName;
}
Reply
#3

read this link below after reading you will know how to use it properly if u need more help tell me
https://sampwiki.blast.hk/wiki/Format
Reply
#4

Show one line above.
Reply
#5

Read And Learn
Reply
#6

The problem is line 134. He just forgot to write ";" at the end of the line 134.
Reply
#7

Quote:
Originally Posted by Areax
Посмотреть сообщение
The problem is line 134. He just forgot to write ";" at the end of the line 134.
Right , and he didn't format the string correctly so i gave him full code.
Reply
#8

Quote:
Originally Posted by Areax
Посмотреть сообщение
The problem is line 134. He just forgot to write ";" at the end of the line 134.
Yours answer is right, he missed ';' and also what valuse must %s & %d be
Reply
#9

if he just do like
pawn Код:
format(string, sizeof(string), "You have set %s's virtual world to %d.");
He won't get any error.
Reply
#10

Are you sure??

EDIT:: ya no errors maybe but he will recieve %s instead of their name
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)