SetPlayerVirtualWorld(playerid, i);
#1

SetPlayerVirtualWorld(playerid, i);

Код:
Undefined symbol "i"
Why cant use a random virtualworld?

Its for houses with the same interior...
Reply
#2

'i' is not a random integer. You have to define it first (as the error says).

pawn Код:
new i = random(128);
should work. Put that above.
You can change the 128 to set the max number it'll randomize to.
Reply
#3

Quote:
Originally Posted by Eric
Посмотреть сообщение
'i' is not a random integer. You have to define it first (as the error says).

pawn Код:
new i = random(128);
should work. Put that above.
You can change the 128 to set the max number it'll randomize to.
The compiler will crash if I define "i".
I dont know why

Another way to make a random virtual world?
On define random(12; pawno crash
Reply
#4

I need fast help, i meet other players in my house...
Reply
#5

Try
pawn Код:
new x = random(128);
Change the 'i' variables to 'x'.
Reply
#6

Eric, i tried another variables, like "rvw = random(12;" but the compiler crash
Reply
#7

use:

pawn Код:
new PlayerVirtualWorld = random(128);
SetPlayerVirtualWorld(playerid, PlayerVirtualWorld);
should work

or if you want to have a special virtual world for EACH player, so NOone will be in the same, i recommend you to use:
pawn Код:
SetPlayerVirtualWorld(playerid, playerid); // this will set every players interior to the id he has, so everyone will have a different one
Reply
#8

This problem is solved (I added hWorld at enum hInfo, every house have an different virtual world)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)