Run time Error 4, after changing the command.
#1

Hi, so after I added the clothes part of /buy in a store, it gave me debug errors and the command didn't work in game.

http://prntscr.com/bst9sp

Full /buy command;
http://pastebin.com/qsLpRST4

I did ******, and I do understand the problem, but couldn't find out why in my code.
Reply
#2

Problem here is
PHP код:
format(nFormat128"%s"Stores[GetPlayerVirtualWorld(playerid)+500][Name]); 
PHP код:
//virtualworld = 509
StoresGetPlayerVirtualWorld(playerid)+500 //index 509 + 500 = 1009

//I think you wanted to do
//virtualworld = 509
StoresGetPlayerVirtualWorld(playerid)-500 //index 509 - 500 = 9 
Reply
#3

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
Problem here is
PHP код:
format(nFormat128"%s"Stores[GetPlayerVirtualWorld(playerid)+500][Name]); 
PHP код:
//virtualworld = 509
StoresGetPlayerVirtualWorld(playerid)+500 //index 509 + 500 = 1009
//I think you wanted to do
//virtualworld = 509
StoresGetPlayerVirtualWorld(playerid)-500 //index 509 - 500 = 9 
Nope, stores virtual world are 500+, I believe I meant only getplayervw, Gonna test this.
Edit; You're right, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)